This commit is contained in:
seb
2026-10-10 18:17:14 +02:00
parent 004e0de869
commit a20668cd61
31 changed files with 572 additions and 76 deletions

View File

@@ -8,35 +8,45 @@ import { http } from './http.js';
*/
export const quote = {
/** GET /api/quote → { quotes: QuoteSummary[] } */
// #region GET /api/quote — list
list() {
return http('/api/quote');
},
// #endregion
/** GET /api/quote/:id → { quote: Quote } */
// #region GET /api/quote/:id — get
get(id) {
return http(`/api/quote/${id}`);
},
// #endregion
/**
* POST /api/quote
* Body: { number, date, entityId?, lines }
* → 201 { quote: Quote }
*/
// #region POST /api/quote — create
create(body) {
return http('/api/quote', { method: 'POST', body });
},
// #endregion
/**
* PATCH /api/quote/:id
* Body: partial { number?, date?, entityId?, lines? }
* → 200 { quote: Quote }
*/
// #region PATCH /api/quote/:id — update
update(id, body) {
return http(`/api/quote/${id}`, { method: 'PATCH', body });
},
// #endregion
/** DELETE /api/quote/:id → 204 */
// #region DELETE /api/quote/:id — delete
delete(id) {
return http(`/api/quote/${id}`, { method: 'DELETE' });
},
// #endregion
};