Add UI for admins to view and edit member cards

This commit is contained in:
2020-01-15 00:12:50 +00:00
parent 4d44e2c3cb
commit 4e82f13f74
7 changed files with 349 additions and 156 deletions
+6 -1
View File
@@ -33,6 +33,11 @@ export const requester = (route, method, token, data) => {
method: method,
body: formData,
};
} else if (method == 'DELETE') {
options = {
...options,
method: method,
};
} else {
throw new Error('Method not supported');
}
@@ -48,7 +53,7 @@ export const requester = (route, method, token, data) => {
if (!response.ok) {
throw customError(response);
}
return response.json();
return method === 'DELETE' ? {} : response.json();
})
.catch(error => {
const code = error.data ? error.data.status : null;