render data with Handlebars template, support tags
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -32,8 +32,7 @@ interface CreateWildDuckAddressResponse {
|
||||
success: boolean;
|
||||
id: string;
|
||||
}
|
||||
|
||||
type AliasesData = any;
|
||||
type AliasesData = { tags?: string[] }
|
||||
type AliasesPatch = any;
|
||||
type AliasesQuery = any;
|
||||
|
||||
@@ -50,7 +49,7 @@ export interface AliasesParams extends Params<AliasesQuery> {
|
||||
export class AliasesService<ServiceParams extends AliasesParams = AliasesParams>
|
||||
implements ServiceInterface<AliasApiResponse, AliasesData, ServiceParams, AliasesPatch>
|
||||
{
|
||||
constructor(public options: AliasesServiceOptions) {}
|
||||
constructor(public options: AliasesServiceOptions) { }
|
||||
|
||||
async find(params: ServiceParams): Promise<AliasApiResponse[]> {
|
||||
const userId = await this.getUserIdByEmailAddress(params);
|
||||
@@ -74,6 +73,7 @@ export class AliasesService<ServiceParams extends AliasesParams = AliasesParams>
|
||||
|
||||
const createResult = await wildDuckClient.post<CreateWildDuckAddressResponse>(`/users/${userId}/addresses`, {
|
||||
address: `${alias}@${emailDomain}`,
|
||||
tags: data.tags,
|
||||
});
|
||||
|
||||
if (!createResult.data.success) {
|
||||
|
Reference in New Issue
Block a user