mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
added missing endpoint
This commit is contained in:
parent
f607a66b40
commit
c9bb0e7ff9
@ -0,0 +1,15 @@
|
|||||||
|
import { User } from "@models"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
method: "GET",
|
||||||
|
route: "/email_available",
|
||||||
|
fn: async (req, res) => {
|
||||||
|
const user = await User.findOne({
|
||||||
|
email: req.query.email,
|
||||||
|
})
|
||||||
|
|
||||||
|
return res.json({
|
||||||
|
available: !user,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user