import { Router } from "express"; import Register from "./register"; import OAuthRoute from "./oauth"; const UserRoute: Router = Router(); /** * @api {post} /user/register * @apiName UserRegister * * @apiGroup user * @apiPermission none * * @apiParam {String} mail EMail linked to this Account * @apiParam {String} username The new Username * @apiParam {String} password Password hashed and salted like specification * @apiParam {String} salt The Salt used for password hashing * @apiParam {String} regcode The regcode, that should be used * @apiParam {String} gender Gender can be: "male", "female", "other", "none" * @apiParam {String} name The real name of the User * * @apiSuccess {Boolean} success * * @apiErrorExample {Object} Error-Response: { error: [ { message: "Some Error", field: "username" } ], status: 400 } */ UserRoute.post("/register", Register); UserRoute.use("/oauth", OAuthRoute); export default UserRoute;