From 36f09b816a315195e8f1917e275fbf0e8a7d5f7a Mon Sep 17 00:00:00 2001 From: morteza-mortezai Date: Tue, 16 Dec 2025 13:05:24 +0330 Subject: [PATCH] update icons service endpoints --- src/modules/icons/providers/icons.service.ts | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/modules/icons/providers/icons.service.ts b/src/modules/icons/providers/icons.service.ts index 690dc1c..6d3a2ef 100644 --- a/src/modules/icons/providers/icons.service.ts +++ b/src/modules/icons/providers/icons.service.ts @@ -31,7 +31,7 @@ export class IconsService { async createIcon(dto: CreateIconDto) { try { const { data } = await firstValueFrom( - this.httpService.post(`${this.config.baseUrl}/admin/icons`, dto, { headers: this.getHeaders() }).pipe( + this.httpService.post(`${this.config.baseUrl}/super-admin/icons`, dto, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to create icon: ${err.message}`, err.stack); return throwError(() => err); @@ -48,7 +48,7 @@ export class IconsService { async findAllIcons() { try { const { data } = await firstValueFrom( - this.httpService.get(`${this.config.baseUrl}/admin/icons`, { headers: this.getHeaders() }).pipe( + this.httpService.get(`${this.config.baseUrl}/super-admin/icons`, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to fetch icons: ${err.message}`, err.stack); return throwError(() => err); @@ -65,7 +65,7 @@ export class IconsService { async findOneIcon(id: string) { try { const { data } = await firstValueFrom( - this.httpService.get(`${this.config.baseUrl}/admin/icons/${id}`, { headers: this.getHeaders() }).pipe( + this.httpService.get(`${this.config.baseUrl}/super-admin/icons/${id}`, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to fetch icon: ${err.message}`, err.stack); return throwError(() => err); @@ -82,7 +82,7 @@ export class IconsService { async updateIcon(id: string, dto: UpdateIconDto) { try { const { data } = await firstValueFrom( - this.httpService.patch(`${this.config.baseUrl}/admin/icons/${id}`, dto, { headers: this.getHeaders() }).pipe( + this.httpService.patch(`${this.config.baseUrl}/super-admin/icons/${id}`, dto, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to update icon: ${err.message}`, err.stack); return throwError(() => err); @@ -99,7 +99,7 @@ export class IconsService { async removeIcon(id: string) { try { const { data } = await firstValueFrom( - this.httpService.delete(`${this.config.baseUrl}/admin/icons/${id}`, { headers: this.getHeaders() }).pipe( + this.httpService.delete(`${this.config.baseUrl}/super-admin/icons/${id}`, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to delete icon: ${err.message}`, err.stack); return throwError(() => err); @@ -117,7 +117,7 @@ export class IconsService { async createGroup(dto: CreateGroupDto) { try { const { data } = await firstValueFrom( - this.httpService.post(`${this.config.baseUrl}/admin/icons/groups`, dto, { headers: this.getHeaders() }).pipe( + this.httpService.post(`${this.config.baseUrl}/super-admin/icons/groups`, dto, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to create group: ${err.message}`, err.stack); return throwError(() => err); @@ -134,7 +134,7 @@ export class IconsService { async findAllGroups() { try { const { data } = await firstValueFrom( - this.httpService.get(`${this.config.baseUrl}/admin/icons/groups`, { headers: this.getHeaders() }).pipe( + this.httpService.get(`${this.config.baseUrl}/super-admin/icons/groups`, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to fetch groups: ${err.message}`, err.stack); return throwError(() => err); @@ -151,7 +151,7 @@ export class IconsService { async findOneGroup(id: string) { try { const { data } = await firstValueFrom( - this.httpService.get(`${this.config.baseUrl}/admin/icons/groups/${id}`, { headers: this.getHeaders() }).pipe( + this.httpService.get(`${this.config.baseUrl}/super-admin/icons/groups/${id}`, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to fetch group: ${err.message}`, err.stack); return throwError(() => err); @@ -168,7 +168,7 @@ export class IconsService { async updateGroup(id: string, dto: UpdateGroupDto) { try { const { data } = await firstValueFrom( - this.httpService.patch(`${this.config.baseUrl}/admin/icons/groups/${id}`, dto, { headers: this.getHeaders() }).pipe( + this.httpService.patch(`${this.config.baseUrl}/super-admin/icons/groups/${id}`, dto, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to update group: ${err.message}`, err.stack); return throwError(() => err); @@ -185,7 +185,7 @@ export class IconsService { async removeGroup(id: string) { try { const { data } = await firstValueFrom( - this.httpService.delete(`${this.config.baseUrl}/admin/icons/groups/${id}`, { headers: this.getHeaders() }).pipe( + this.httpService.delete(`${this.config.baseUrl}/super-admin/icons/groups/${id}`, { headers: this.getHeaders() }).pipe( catchError((err: AxiosError) => { this.logger.error(`Failed to delete group: ${err.message}`, err.stack); return throwError(() => err);