File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,14 @@ impl AttendanceMutations {
42
42
return Err ( async_graphql:: Error :: new ( "HMAC verification failed" ) ) ;
43
43
}
44
44
45
- let now = Local :: now ( ) . with_timezone ( & Kolkata ) . date_naive ( ) ;
45
+ let now = Local :: now ( ) . with_timezone ( & Kolkata ) . time ( ) ;
46
46
let attendance = sqlx:: query_as :: < _ , Attendance > (
47
47
"UPDATE Attendance SET time_in = CASE
48
- WHEN time_in IN NULL THEN $1
48
+ WHEN time_in IS NULL THEN $1
49
49
ELSE time_in END,
50
- time_out = $1
51
- WHERE id = $2 AND date = $3 RETURNING *
50
+ time_out = $1,
51
+ is_present = TRUE
52
+ WHERE member_id = $2 AND date = $3 RETURNING *
52
53
" ,
53
54
)
54
55
. bind ( now)
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ pub struct CreateMemberInput {
33
33
pub roll_no : String ,
34
34
pub name : String ,
35
35
pub email : String ,
36
- pub sex : String ,
36
+ pub sex : Sex ,
37
37
pub year : i32 ,
38
38
pub hostel : String ,
39
39
pub mac_address : String ,
You can’t perform that action at this time.
0 commit comments