Skip to content

Commit

Permalink
fix(com-api): user-list-inc-order permission
Browse files Browse the repository at this point in the history
  • Loading branch information
njfamirm authored and AliMD committed May 27, 2023
1 parent 4c4cd2b commit 91beb27
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/type/src/customer-order-management.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const orderStatusCS = [
] as const;
export type OrderStatus = (typeof orderStatusCS)[number];

export const userPermissionsCS = ['user/patch', 'price/patch', 'product/patch', 'user-list/read'] as const;
export const userPermissionsCS = ['user/patch', 'price/patch', 'product/patch', 'user-list-inc-order/read'] as const;
export type UserPermission = (typeof userPermissionsCS)[number];

// -- Document object --
Expand Down
2 changes: 1 addition & 1 deletion uniquely/com-api/src/route/admin/user-list-inc-order.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type {ComUser} from '@alwatr/type/customer-order-management.js';
nanoServer.route<Record<string, ComUser>>('GET', '/admin/user-list-inc-order', async (connection) => {
logger.logMethod?.('get-admin-user-list-inc-order');

await validateUserAuth(connection.getUserAuth(), 'user-list/read');
await validateUserAuth(connection.getUserAuth(), 'user-list-inc-order/read');

return {
ok: true,
Expand Down
2 changes: 1 addition & 1 deletion uniquely/com-pwa/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const config = {
newOrder: apiBaseUrl + 'order',

// admin access
userList: apiBaseUrl + 'user-list',
adminUserListIncOrder: apiBaseUrl + 'admin/user-list-inc-order',
},

fetchContextOptions: <Partial<FetchOptions>>{
Expand Down

0 comments on commit 91beb27

Please sign in to comment.