Add endpoints for tags
This commit is contained in:
parent
c8f40284ef
commit
8d996888bd
10 changed files with 141 additions and 18 deletions
emgauwa-lib/src/db
|
@ -77,6 +77,14 @@ impl DbSchedule {
|
|||
ScheduleUid::Any(_) => Ok(filter_uid),
|
||||
}?;
|
||||
|
||||
if sqlx::query_scalar!("SELECT 1 FROM schedules WHERE uid = ?", filter_uid)
|
||||
.fetch_optional(conn.deref_mut())
|
||||
.await?
|
||||
.is_none()
|
||||
{
|
||||
return Err(DatabaseError::NotFound);
|
||||
}
|
||||
|
||||
sqlx::query!("DELETE FROM schedules WHERE uid = ?", filter_uid)
|
||||
.execute(conn.deref_mut())
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue