You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
546 B

  1. const baseUrl = '/api/auth'
  2. export const authRoutes = (app) => {
  3. app.post(`${baseUrl}/login`, (req, res) => {
  4. // const { username, password } = req.body
  5. const mockResponse = {
  6. code: '0',
  7. msg: '成功',
  8. data: {
  9. id: 1,
  10. createTime: '2025-04-27 07:44:01',
  11. updateTime: '2025-04-27 07:44:01',
  12. username: 'admin',
  13. nickname: 'Admin',
  14. password: null,
  15. role: 'ADMIN',
  16. deleted: 'DISABLE',
  17. fixedUser: 'ENABLE',
  18. },
  19. }
  20. res.json(mockResponse)
  21. })
  22. }