-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2101 from ever-co/feat/static-build-support-5
Feat/Next-Frontend APIs
- Loading branch information
Showing
11 changed files
with
111 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
import { IProject } from '@app/interfaces'; | ||
import api from '../axios'; | ||
import { put } from '../axios'; | ||
|
||
export function editOrganizationProjectSettingAPI(id: string, data: any, tenantId?: string) { | ||
return api.put<any>(`/organization-projects/setting/${id}`, data, { | ||
headers: { | ||
'Tenant-Id': tenantId | ||
} | ||
return put<any>(`/organization-projects/setting/${id}`, data, { | ||
tenantId | ||
}); | ||
} | ||
|
||
export function editOrganizationProjectAPI(id: string, data: any, tenantId?: string) { | ||
return api.put<IProject>(`/organization-projects/${id}`, data, { | ||
headers: { | ||
'Tenant-Id': tenantId | ||
} | ||
return put<IProject>(`/organization-projects/${id}`, data, { | ||
tenantId | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
import { IRolePermissions, PaginationResponse } from '@app/interfaces/'; | ||
import api from '../axios'; | ||
import { get, put } from '../axios'; | ||
import { getTenantIdCookie } from '@app/helpers'; | ||
|
||
export function getRolePermissionAPI(id: string) { | ||
return api.get<PaginationResponse<IRolePermissions>>(`/role-permissions/${id}`); | ||
const tenantId = getTenantIdCookie(); | ||
|
||
const params = { | ||
data: JSON.stringify({ | ||
findInput: { | ||
roleId: id, | ||
tenantId | ||
} | ||
}) | ||
}; | ||
const query = new URLSearchParams(params); | ||
|
||
return get<PaginationResponse<IRolePermissions>>(`/role-permissions/${id}?${query.toString()}`); | ||
} | ||
|
||
export function updateRolePermissionAPI(data: IRolePermissions) { | ||
return api.put<IRolePermissions>(`/role-permissions/${data.id}`, data); | ||
return put<IRolePermissions>(`/role-permissions/${data.id}`, data); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters