small adjustments #1
@ -45,10 +45,8 @@ function renderAliases(aliases) {
|
||||
}
|
||||
})
|
||||
|
||||
aDelete.classList.add('btn')
|
||||
aDelete.classList.add('btn-danger')
|
||||
aDelete.classList.add('btn', 'btn-danger')
|
||||
aDelete.innerText = 'Delete'
|
||||
aDelete.setAttribute('href', `/aliases/${alias.id}`)
|
||||
tdActions.appendChild(aDelete)
|
||||
|
||||
tr.appendChild(tdAddress)
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ import { validateAuth } from "../../hooks/validate-auth";
|
||||
import { AliasesService, getOptions } from "./aliases.class";
|
||||
|
||||
export const aliasesPath = "aliases";
|
||||
export const aliasesMethods = ["find", "create"] as const;
|
||||
export const aliasesMethods = ["find", "create", "remove"] as const;
|
||||
|
||||
export * from "./aliases.class";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user