connected api with card balance and and requisites
This commit is contained in:
@@ -13,11 +13,13 @@ export interface AddRoleUserPayload {
|
||||
userId: number;
|
||||
}
|
||||
|
||||
export interface AddPermissionUserPayload {
|
||||
export interface AddPermissionRolePayload {
|
||||
permissionId: number;
|
||||
userId: number;
|
||||
roleId: number;
|
||||
}
|
||||
|
||||
export type AddPermissionUserPayload = AddPermissionRolePayload;
|
||||
|
||||
// Re-export so shared hooks can import from one place
|
||||
export type { BranchListParams, BranchListResponse };
|
||||
|
||||
@@ -67,13 +69,15 @@ export async function postRoleUser(payload: AddRoleUserPayload): Promise<void> {
|
||||
}
|
||||
|
||||
/**
|
||||
* POST /permission-users
|
||||
* Assigns a permission to a user.
|
||||
* POST /permission-roles
|
||||
* Assigns a permission to a role.
|
||||
*/
|
||||
export async function postPermissionUser(payload: AddPermissionUserPayload): Promise<void> {
|
||||
await apiClient.post("/permission-users", payload);
|
||||
export async function postPermissionRole(payload: AddPermissionRolePayload): Promise<void> {
|
||||
await apiClient.post("/permission-roles", payload);
|
||||
}
|
||||
|
||||
export const postPermissionUser = postPermissionRole;
|
||||
|
||||
/**
|
||||
* Proxy for branch list fetching — kept here so shared hooks
|
||||
* don't import directly from the branches feature.
|
||||
|
||||
Reference in New Issue
Block a user