1
0
forked from PGL/Clyde

Login and register ok and starting requests

This commit is contained in:
2024-03-18 11:55:51 +01:00
parent 8ff29ca34e
commit 753af3874e
13 changed files with 42 additions and 33 deletions

View File

@ -11,6 +11,7 @@ export async function restPost(endPoint, data) {
return await _rest(endPoint, {method: "POST", credentials: 'include', body: JSON.stringify(data)});
}
export async function restPostFile(endPoint, file){
let headers = new Headers();
return await _rest(endPoint, {method: "POST", credentials: 'include', body: file, headers: headers });
@ -24,6 +25,10 @@ export async function restPatch(endPoint, data) {
return await _rest(endPoint, {method: "PATCH", credentials: 'include', body: JSON.stringify(data)});
}
export async function restPatchInfo(endPoint, data){
return await _rest(endPoint, {method: "PATCH", credentials: 'include', body: data});
}
/**
* backbone for the request made by the frontend
*