Skip to content

Commit

Permalink
fix: Imports
Browse files Browse the repository at this point in the history
  • Loading branch information
MrExplode committed Nov 9, 2023
1 parent 2c7cabe commit 006a6a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/jira.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
use std::fs::File;
use std::io::prelude::*;
use std::env;
use std::sync::Arc;
use std::{env, path::Path};

use actix_web::{
post,
web::{self, Data},
HttpResponse, Responder,
};
use anyhow::Result;
use chrono::Utc;
use serde::Deserialize;
use serde_json::json;
use webhook::models::{Embed, Message};
Expand Down
5 changes: 5 additions & 0 deletions src/util.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
use std::io::prelude::*;
use std::{fs::File, path::Path};

use chrono::Utc;

pub fn log_request(data: &String) -> std::io::Result<()> {
let _ = std::fs::create_dir_all(Path::new("requests/"));
let mut file = File::create(format!("requests/request_{}.json", Utc::now().format("%m-%d_%H-%M-%S")))?;
Expand Down

0 comments on commit 006a6a9

Please sign in to comment.