refactor: Admin App with better layouts and Meta Information (#7200)
* fix: layout structure in admin * fix: layout structure in admin * fix: delete layout files * chore: updated form related info * fix: admin import statements * fix: general page unauthorized flickering issue * chore: logs related * chore: lock file updates * fix: build errors * fix: coderabbit suggestions
This commit is contained in:
parent
7153064ebb
commit
8cc23bc4a5
70 changed files with 554 additions and 518 deletions
|
|
@ -20,11 +20,10 @@ export class UserService extends APIService {
|
|||
|
||||
/**
|
||||
* Retrieves the current user details
|
||||
* @returns {Promise<IUser>} Promise resolving to the current user details\
|
||||
* @remarks This method uses the validateStatus: null option to bypass interceptors for unauthorized errors.
|
||||
* @returns {Promise<IUser>} Promise resolving to the current user details
|
||||
*/
|
||||
async me(): Promise<IUser> {
|
||||
return this.get("/api/users/me/", { validateStatus: null })
|
||||
return this.get("/api/users/me/")
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response;
|
||||
|
|
@ -76,10 +75,9 @@ export class UserService extends APIService {
|
|||
* Retrieves the current instance admin details
|
||||
* @returns {Promise<IUser>} Promise resolving to the current instance admin details
|
||||
* @throws {Error} If the API request fails
|
||||
* @remarks This method uses the validateStatus: null option to bypass interceptors for unauthorized errors.
|
||||
*/
|
||||
async adminDetails(): Promise<IUser> {
|
||||
return this.get("/api/instances/admins/me/", { validateStatus: null })
|
||||
return this.get("/api/instances/admins/me/")
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response?.data;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue