Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/graphql/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl QueryRoot {
let pool = ctx.data::<Arc<PgPool>>().expect("Pool not found in context");

let attendance_list = sqlx::query_as::<_, Attendance>(
"SELECT id, date, timein, timeout FROM Attendance WHERE date = $1"
"SELECT id, date, timein, timeout, is_present FROM Attendance WHERE date = $1"
)
.bind(date)
.fetch_all(pool.as_ref())
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ async fn scheduled_task(pool: Arc<PgPool>) {
let timeout = NaiveTime::from_hms_opt(0, 0, 0); // Default time, can be modified as needed

let attendance = sqlx::query(
"INSERT INTO Attendance (id, date, timein, timeout, present) VALUES ($1, $2, $3, $4, $5) ON CONFLICT (id, date) DO NOTHING RETURNING *"
"INSERT INTO Attendance (id, date, timein, timeout, is_present) VALUES ($1, $2, $3, $4, $5) ON CONFLICT (id, date) DO NOTHING RETURNING *"
)
.bind(member.id)
.bind(today)
Expand Down