u
This commit is contained in:
@@ -183,6 +183,16 @@ async function httpGetBinary(path) {
|
||||
return blob;
|
||||
}
|
||||
|
||||
/**
|
||||
* Company-scoped article search index (selectedCompanyId from session).
|
||||
* GET /api/articleIndex → { articles: [...] }
|
||||
*/
|
||||
export const articleIndex = {
|
||||
list() {
|
||||
return http('/api/articleIndex');
|
||||
},
|
||||
};
|
||||
|
||||
export const article = {
|
||||
search({ target, filter, offset, maxCount } = {}) {
|
||||
const params = new URLSearchParams({ target });
|
||||
@@ -512,12 +522,9 @@ export const brand = {
|
||||
};
|
||||
|
||||
export const company = {
|
||||
async list() {
|
||||
try {
|
||||
return await http('/api/company');
|
||||
} catch {
|
||||
return { companies: [] };
|
||||
}
|
||||
/** GET /api/company → { companies: [...] } */
|
||||
list() {
|
||||
return http('/api/company');
|
||||
},
|
||||
|
||||
/** Uses GET /api/company until a dedicated endpoint exists. */
|
||||
@@ -682,4 +689,14 @@ export const auth = {
|
||||
},
|
||||
};
|
||||
|
||||
export default { auth, article, brand, category, company, posterminal, thumb, unit };
|
||||
export default {
|
||||
auth,
|
||||
article,
|
||||
articleIndex,
|
||||
brand,
|
||||
category,
|
||||
company,
|
||||
posterminal,
|
||||
thumb,
|
||||
unit,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user