Skip to content

Commit 43740d6

Browse files
committed
fixed import issues
1 parent fbaacc7 commit 43740d6

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
async-graphql = { version = "7.0.6", features = ["chrono"] }
88
async-graphql-axum = "7.0.6"
99
axum = "0.7.3"
10-
chrono = "0.4.38"
10+
chrono = {version = "0.4.38", features = ["std"] }
1111
serde = { version = "1.0.188", features = ["derive"] }
1212
shuttle-axum = "0.46.0"
1313
shuttle-runtime = "0.46.0"

src/graphql/mutations.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
use async_graphql::{Context, Object};
22
use ::chrono::Local;
3-
use chrono::{NaiveDate, NaiveTime};
3+
use chrono::{NaiveDate, NaiveTime, Duration};
44
use chrono_tz::Asia::Kolkata;
55
use sqlx::PgPool;
6-
use sqlx::types::chrono;
76
use std::sync::Arc;
87
use hmac::{Hmac,Mac};
98
use sha2::Sha256;
109

11-
1210
type HmacSha256 = Hmac<Sha256>;
1311

1412
use crate::db::{member::Member, attendance::Attendance};
@@ -116,7 +114,7 @@ impl MutationRoot {
116114

117115
let current_time = Local::now().with_timezone(&Kolkata).time();
118116

119-
let prev_date = date - chrono::Duration::days(1);
117+
let prev_date = date - Duration::days(1);
120118

121119
let prev_attendance: Option<Attendance> = sqlx::query_as::<_, Attendance>(
122120
"SELECT * FROM Attendance WHERE id = $1 AND date = $2"

0 commit comments

Comments
 (0)