diff --git a/apps/mina-sidor-fa/src/app/shared/services/api/employee.service.ts b/apps/mina-sidor-fa/src/app/shared/services/api/employee.service.ts index cf36ae8..9a02a01 100644 --- a/apps/mina-sidor-fa/src/app/shared/services/api/employee.service.ts +++ b/apps/mina-sidor-fa/src/app/shared/services/api/employee.service.ts @@ -179,7 +179,7 @@ export class EmployeeService extends UnsubscribeDirective { public postEmployeeInvitation(email: string): Observable { return this.httpClient - .post<{ data: EmployeeInviteRequestData }>(`${this._apiBaseUrl}/invite`, { + .patch<{ data: EmployeeInviteRequestData }>(`${this._apiBaseUrl}/invite`, { emails: Object.values(email), }) .pipe( @@ -190,7 +190,7 @@ export class EmployeeService extends UnsubscribeDirective { } public updateEmployeeData(employeeData: Employee): Observable { - return /* this.httpClient.put<{ id: string }>(`${this._apiBaseUrl}/${employeeData.id}`, + return /* this.httpClient.put<{ id: string }>(`${this._apiBaseUrl}/${employeeData.id}`, mapEmployeeToRequestData(employeeData), API_HEADERS).pipe( map(({ id }) => id), catchError(error => throwError({ message: error as string, type: ErrorType.API }))