chore(*): use prettier for formatting
This commit is contained in:
parent
6c659fe1d0
commit
ce869012ef
73 changed files with 1393 additions and 794 deletions
|
@ -32,9 +32,9 @@ const request = async (method, endpoint, body = null) => {
|
|||
method,
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${API_TOKEN}`,
|
||||
Authorization: `Bearer ${API_TOKEN}`
|
||||
},
|
||||
body: body ? JSON.stringify(body) : null,
|
||||
body: body ? JSON.stringify(body) : null
|
||||
});
|
||||
|
||||
if (!res.ok) {
|
||||
|
@ -63,8 +63,8 @@ export const searchItems = async (collection, query = '', filters = {}) => {
|
|||
method: 'GET',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
Authorization: `Bearer ${API_TOKEN}`,
|
||||
},
|
||||
Authorization: `Bearer ${API_TOKEN}`
|
||||
}
|
||||
});
|
||||
const data = await res.json();
|
||||
|
||||
|
@ -76,6 +76,7 @@ export const searchItems = async (collection, query = '', filters = {}) => {
|
|||
}
|
||||
};
|
||||
|
||||
export const updateItem = async (collection, id, values) => await request('PATCH', `${collection}/${id}`, values);
|
||||
export const updateItem = async (collection, id, values) =>
|
||||
await request('PATCH', `${collection}/${id}`, values);
|
||||
|
||||
export const createItem = async (collection, values) => await request('POST', collection, values);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue