This commit is contained in:
seb
2026-07-19 16:37:45 +02:00
parent 17a36b2283
commit 9c20672e26
13 changed files with 481 additions and 26 deletions

View File

@@ -28,6 +28,16 @@ async function http(path, { method = 'GET', body } = {}) {
return res.json();
}
export const article = {
search({ target, filter, offset, maxCount } = {}) {
const params = new URLSearchParams({ target });
if (filter) params.set('filter', filter);
if (offset) params.set('offset', String(offset));
if (maxCount != null) params.set('maxCount', String(maxCount));
return http(`/api/article/search?${params}`);
},
};
export const auth = {
async me() {
try {
@@ -66,4 +76,4 @@ export const auth = {
},
};
export default { auth };
export default { auth, article };