fix deleting
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Sergo 2023-07-30 11:27:10 +03:00
parent 11107c04ed
commit bd7583cc20

View File

@ -123,11 +123,10 @@ export class AliasesService<ServiceParams extends AliasesParams = AliasesParams>
) {
throw new BadRequest("Unable to delete address");
}
await wildDuckClient.delete<Alias>(`/addresses/${id}`);
const userId = await this.getUserIdByEmailAddress(params);
await wildDuckClient.delete<Alias>(`users/${userId}/addresses/${id}`);
return this.getUserAddresses(userId);
}
}