fix bug in contacts
This commit is contained in:
@@ -27,7 +27,7 @@ export class ContactService {
|
|||||||
async findAll() {
|
async findAll() {
|
||||||
try {
|
try {
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService.get(`${this.config.baseUrl}/super-admin/contacts`, { headers: this.getHeaders() }).pipe(
|
this.httpService.get(`${this.config.baseUrl}/super-admin/contact`, { headers: this.getHeaders() }).pipe(
|
||||||
catchError((err: AxiosError) => {
|
catchError((err: AxiosError) => {
|
||||||
this.logger.error(`Failed to fetch contacts: ${err.message}`, err.stack);
|
this.logger.error(`Failed to fetch contacts: ${err.message}`, err.stack);
|
||||||
return throwError(() => err);
|
return throwError(() => err);
|
||||||
@@ -44,7 +44,7 @@ export class ContactService {
|
|||||||
async findOne(id: number) {
|
async findOne(id: number) {
|
||||||
try {
|
try {
|
||||||
const { data } = await firstValueFrom(
|
const { data } = await firstValueFrom(
|
||||||
this.httpService.get(`${this.config.baseUrl}/super-admin/contacts/${id}`, { headers: this.getHeaders() }).pipe(
|
this.httpService.get(`${this.config.baseUrl}/super-admin/contact/${id}`, { headers: this.getHeaders() }).pipe(
|
||||||
catchError((err: AxiosError) => {
|
catchError((err: AxiosError) => {
|
||||||
this.logger.error(`Failed to fetch contact: ${err.message}`, err.stack);
|
this.logger.error(`Failed to fetch contact: ${err.message}`, err.stack);
|
||||||
return throwError(() => err);
|
return throwError(() => err);
|
||||||
|
|||||||
Reference in New Issue
Block a user