chore(*): use prettier for formatting

This commit is contained in:
Cory Dransfeldt 2025-06-14 16:43:12 -07:00
parent 6c659fe1d0
commit 029caaaa9e
No known key found for this signature in database
73 changed files with 1390 additions and 794 deletions

View file

@ -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);

View file

@ -25,13 +25,13 @@ export const promptForMultipleRelations = async (collection, label = collection)
type: 'checkbox',
name: 'selected',
message: `✔ Select ${label} to add:`,
choices: results.map(item => ({
choices: results.map((item) => ({
name: item.name || item.title || item.id,
value: item.id
}))
});
selected.forEach(id => selectedIds.add(id));
selected.forEach((id) => selectedIds.add(id));
const { again } = await inquirer.prompt({
type: 'confirm',