Do not load gallery on API access

This commit is contained in:
Alexandre Iooss 2022-03-02 21:45:42 +01:00
parent de9c37e617
commit 350ab12fc4

View file

@ -50,6 +50,7 @@ class lgAdmin {
data.append('csrfmiddlewaretoken', this.csrfToken);
fetch(`/photo/${this.photoId}/delete/`, {
method: "POST",
redirect: "manual", // do not load gallery again
body: data,
credentials: 'same-origin',
}).then(res => {
@ -74,6 +75,7 @@ class lgAdmin {
data.append('csrfmiddlewaretoken', this.csrfToken);
fetch(`/photo/${this.photoId}/report/`, {
method: "POST",
redirect: "manual", // do not load gallery again
body: data,
credentials: 'same-origin',
}).then(res => {