u
This commit is contained in:
20
src/api/number.js
Normal file
20
src/api/number.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import { http } from './http.js';
|
||||
|
||||
export const number = {
|
||||
/**
|
||||
* GET /api/number → { numbers: [{ id, type, prefix, padding, next }] }
|
||||
* Lists the number sequences for the selected company.
|
||||
*/
|
||||
list() {
|
||||
return http('/api/number');
|
||||
},
|
||||
|
||||
/**
|
||||
* PATCH /api/number/:id
|
||||
* Body: at least one of { prefix, padding, next } — only present keys are patched.
|
||||
* → 200 { number: { id, type, prefix, padding, next } }
|
||||
*/
|
||||
update(id, body) {
|
||||
return http(`/api/number/${id}`, { method: 'PATCH', body });
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user