Skip to content

Commit

Permalink
Merge pull request #210 from little3201/develop
Browse files Browse the repository at this point in the history
恢复登录请求的处理
  • Loading branch information
little3201 authored Oct 29, 2024
2 parents 831ffd0 + 474acdc commit c96e7c4
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 c96e7c4

Please sign in to comment.