This commit is contained in:
parent
11107c04ed
commit
bd7583cc20
@ -47,7 +47,7 @@ export interface AliasesParams extends Params<AliasesQuery> {
|
||||
export class AliasesService<ServiceParams extends AliasesParams = AliasesParams>
|
||||
implements ServiceInterface<Alias, AliasesData, ServiceParams, AliasesPatch>
|
||||
{
|
||||
constructor(public options: AliasesServiceOptions) {}
|
||||
constructor(public options: AliasesServiceOptions) { }
|
||||
|
||||
async find(params: ServiceParams): Promise<Alias[]> {
|
||||
const userId = await this.getUserIdByEmailAddress(params);
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user