Commit 6a9de978 authored by Lukas Böhm's avatar Lukas Böhm 🎱
Browse files

Update api.go

parent 8ee8e641
Pipeline #59926 passed with stages
in 2 minutes and 32 seconds
......@@ -211,19 +211,20 @@ func CloseShare(w http.ResponseWriter, r *http.Request) *HTTPError {
return &HTTPError{err, "Can't edit data", 500}
}
// background job
{
job, err := enqueuer.Enqueue("DeleteShare", nil)
////deleteIn := time.Now().Sub(*share.Expires)
//deleteIn := 1
//job, err := enqueuer.EnqueueIn("DeleteShare", int64(deleteIn), map[string]interface{}{
// "ShareID": share.ID,
//})
if err != nil {
return &HTTPError{err, "Error creating background job", 500}
}
PrettyPrint(job)
}
// TODO background job
// TODO send mail
//{
// job, err := enqueuer.Enqueue("DeleteShare", nil)
// ////deleteIn := time.Now().Sub(*share.Expires)
// //deleteIn := 1
// //job, err := enqueuer.EnqueueIn("DeleteShare", int64(deleteIn), map[string]interface{}{
// // "ShareID": share.ID,
// //})
// if err != nil {
// return &HTTPError{err, "Error creating background job", 500}
// }
// PrettyPrint(job)
//}
return SendJSON(w, share)
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment