feat: add renew
This commit is contained in:
@@ -7,8 +7,8 @@ function normalizeItems(items) {
|
||||
}
|
||||
|
||||
export const TenantService = {
|
||||
async listTenants({ page, limit, name, sortField, sortOrder } = {}) {
|
||||
const query = { page, limit, name };
|
||||
async listTenants({ page, limit, name, code, sortField, sortOrder } = {}) {
|
||||
const query = { page, limit, name, code };
|
||||
if (sortField && sortOrder) {
|
||||
if (sortOrder === 1) query.asc = sortField;
|
||||
if (sortOrder === -1) query.desc = sortField;
|
||||
@@ -21,5 +21,11 @@ export const TenantService = {
|
||||
total: data?.total ?? 0,
|
||||
items: normalizeItems(data?.items)
|
||||
};
|
||||
},
|
||||
async renewTenantExpire({ tenantID, duration }) {
|
||||
return requestJson(`/super/v1/tenants/${tenantID}`, {
|
||||
method: 'PATCH',
|
||||
body: { duration }
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user