const BkoUserController = require("../controllers").bkoUser; module.exports = (app, url) => { /** * @swagger * /v1/user/login: * post: * tags: * - Users * summary: Create a JSONPlaceholder user. * requestBody: * required: true * content: * application/json: * schema: * type: object * properties: * username: * type: string * description: The user's username. * example: test * password: * type: string * description: The user's password. * example: password * responses: * 200: * description: Login success * content: * application/json: * schema: * type: object * properties: * accessToken: * type: string * description: Message * example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6InRlc3RAZmxvYXQuc2ciLCJpYXQiOjE2NDcwODIxNDIsImV4cCI6MTY0NzA4Mzk0Mn0.fMQYB4ielKPh21QcZFwOJSjlGNCAg8rkvEcKWctxdX8 * 400: * description: Invalid * content: * application/json: * schema: * type: object * properties: * message: * type: string * description: Message * example: Wrong username or password */ app.post(url + "admin/login", BkoUserController.login); };