Skip to content

Commit

Permalink
fix: change "Authorization" to "token"
Browse files Browse the repository at this point in the history
  • Loading branch information
Pleasurecruise committed Nov 27, 2024
1 parent e98a653 commit 3d456dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions admin/src/api/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const addAdmin = (adminData) => {
* 根据id获取管理员信息
*/
export const getAdminById = (id) => {
console.log('Query admin by id'); // 添加日志
console.log('Query admin by id');
return request.get(`/admin/manage/${id}`, {
params: {id}
}).then(response => {
Expand All @@ -113,7 +113,7 @@ export const getAdminById = (id) => {
* 提供调用登出接口的函数
*/
export const userLogoutService = () => {
console.log('Logout request initiated'); // 添加日志
console.log('Logout request initiated');
return request.post('/admin/manage/logout', null, {
headers: {
'Content-Type': 'application/json'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public Result<Admin> update(@RequestBody AdminDTO adminDTO){
@PutMapping("/password")
@ApiOperation("修改密码")
public Result<Object> updatePassword(
@RequestHeader("Authorization") String token,
@RequestHeader("token") String token,
@RequestBody String oldPassword,
@RequestBody String newPassword,
@RequestBody String confirmPassword){
Expand Down

0 comments on commit 3d456dd

Please sign in to comment.