forked from baron/baron-sso
개발자 권한 부여 페이지 추가
This commit is contained in:
@@ -536,6 +536,8 @@ export type DeveloperRequest = {
|
||||
updatedAt: string;
|
||||
};
|
||||
|
||||
export type DeveloperGrant = DeveloperRequest;
|
||||
|
||||
export async function fetchDeveloperRequestStatus(tenantId?: string) {
|
||||
const { data } = await apiClient.get<DeveloperRequest | { status: "none" }>(
|
||||
"/dev/developer-request/status",
|
||||
@@ -595,3 +597,31 @@ export async function cancelDeveloperRequestApproval(
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function fetchDeveloperGrants(tenantId?: string) {
|
||||
const { data } = await apiClient.get<DeveloperGrant[]>("/dev/developer-grants", {
|
||||
params: { tenantId },
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function createDeveloperGrant(payload: {
|
||||
userId: string;
|
||||
tenantId: string;
|
||||
reason?: string;
|
||||
adminNotes?: string;
|
||||
}) {
|
||||
const { data } = await apiClient.post<DeveloperGrant>(
|
||||
"/dev/developer-grants",
|
||||
payload,
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function revokeDeveloperGrant(id: number, adminNotes: string) {
|
||||
const { data } = await apiClient.post<{ status: string }>(
|
||||
`/dev/developer-grants/${id}/revoke`,
|
||||
{ adminNotes },
|
||||
);
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user