summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/serve.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/serve.rs b/src/serve.rs
index 9d12a03..67d49ae 100644
--- a/src/serve.rs
+++ b/src/serve.rs
@@ -41,8 +41,10 @@ pub fn get_tracks(name: String, url: String) -> Result<(), status::Custom<String
&[&user_id],
)
.unwrap();
- let uid = get_uid(user_id.as_ref(), &mut client)
- .ok_or(status::NotFound(format!("username {} not found", user_id)))?;
+ let uid = get_uid(user_id.as_ref(), &mut client).ok_or(status::Custom(
+ Status::NotFound,
+ format!("username {} not found", user_id),
+ ))?;
client
.execute("DELETE FROM user_track WHERE user_id = $1;", &[&uid])
.unwrap();