Skip to content
Snippets Groups Projects
Commit 36f5c81b authored by Stephen D's avatar Stephen D
Browse files

Merge branch 'enqueue_response' into 'master'

Return enqueue response when new url

Closes #9

See merge request !4
parents 8a154c78 b61f415e
No related branches found
No related tags found
1 merge request!4Return enqueue response when new url
......@@ -65,7 +65,11 @@ pub async fn enqueue_image(
.execute(&pool)
.await
{
Ok(_) => Ok("OK".into_response()),
Ok(_) => Ok(warp::reply::json(&EnqueueImageResponse {
scraped: false,
formats: HashMap::new(),
})
.into_response()),
Err(e) => {
if let sqlx::Error::Database(e) = &e {
// Pg unique key violation = 23505
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment