Fixed 267U.pre2
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import define from "../../define.js";
|
||||
import { validateEmailForAccount } from "../../../../services/validate-email-for-account.js";
|
||||
export const meta = {
|
||||
tags: [
|
||||
"users"
|
||||
],
|
||||
requireCredential: false,
|
||||
res: {
|
||||
type: "object",
|
||||
optional: false,
|
||||
nullable: false,
|
||||
properties: {
|
||||
available: {
|
||||
type: "boolean",
|
||||
optional: false,
|
||||
nullable: false
|
||||
},
|
||||
reason: {
|
||||
type: "string",
|
||||
optional: false,
|
||||
nullable: true
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
export const paramDef = {
|
||||
type: "object",
|
||||
properties: {
|
||||
emailAddress: {
|
||||
type: "string"
|
||||
}
|
||||
},
|
||||
required: [
|
||||
"emailAddress"
|
||||
]
|
||||
};
|
||||
export default define(meta, paramDef, async (ps)=>{
|
||||
return await validateEmailForAccount(ps.emailAddress);
|
||||
});
|
||||
Reference in New Issue
Block a user