✌️
This commit is contained in:
parent
5f4f046cd6
commit
6078363311
3 changed files with 33 additions and 1 deletions
|
|
@ -29,7 +29,8 @@ export default (i, endpoint, data = {}): Promise<{ [x: string]: any }> => {
|
|||
fetch(endpoint.indexOf('://') > -1 ? endpoint : `${_API_URL_}/${endpoint}`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data),
|
||||
credentials: endpoint === 'signin' ? 'include' : 'omit'
|
||||
credentials: endpoint === 'signin' ? 'include' : 'omit',
|
||||
cache: 'no-cache'
|
||||
}).then(res => {
|
||||
if (--pending === 0) spinner.parentNode.removeChild(spinner);
|
||||
if (res.status === 200) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue