Finish first draft of the DELETE /tasks route

This commit is contained in:
Loïc Lecrenier 2022-10-13 12:48:23 +02:00 committed by Clément Renault
parent ef3e9e87f5
commit 012c3e986c
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
5 changed files with 81 additions and 53 deletions

View file

@ -16,6 +16,7 @@ pub static AUTHORIZATIONS: Lazy<HashMap<(&'static str, &'static str), HashSet<&'
("GET", "/indexes/products/documents/0") => hashset!{"documents.get", "documents.*", "*"},
("DELETE", "/indexes/products/documents/0") => hashset!{"documents.delete", "documents.*", "*"},
("GET", "/tasks") => hashset!{"tasks.get", "tasks.*", "*"},
("DELETE", "/tasks") => hashset!{"tasks.delete", "tasks.*", "*"},
("GET", "/tasks?indexUid=products") => hashset!{"tasks.get", "tasks.*", "*"},
("GET", "/tasks/0") => hashset!{"tasks.get", "tasks.*", "*"},
("PATCH", "/indexes/products/") => hashset!{"indexes.update", "indexes.*", "*"},