Skip to content

Commit

Permalink
恢复登录请求的处理
Browse files Browse the repository at this point in the history
  • Loading branch information
little3201 committed Oct 29, 2024
1 parent 355468a commit 474acdc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/api/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ import { SERVER_URL } from 'src/api/paths'
* @returns token
*/
export const signin = (username: string, password: string) => {
return api.post(SERVER_URL.SIGNIN, {}, { auth: { username, password } })
// return api.post(SERVER_URL.SIGNIN, new URLSearchParams({ username, password }))
return api.post(SERVER_URL.SIGNIN, new URLSearchParams({ username, password }))
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/boot/msw-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { handlers } from 'src/mocks/handlers' // 您的请求处理程序

export default boot(() => {
// dev
if (!process.env.DEV) {
if (process.env.DEV) {
const worker = setupWorker(...handlers)
worker.start()
}
Expand Down

0 comments on commit 474acdc

Please sign in to comment.