Skip to content

Commit e8c844e

Browse files
authored
Fix cache cleanup when updating role menu (#585)
1 parent 1d5f2dc commit e8c844e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/app/admin/service/role_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ async def update_role_menu(*, request: Request, pk: int, menu_ids: UpdateRoleMen
122122
raise errors.NotFoundError(msg='菜单不存在')
123123
count = await role_dao.update_menus(db, pk, menu_ids)
124124
if pk in [role.id for role in request.user.roles]:
125-
await redis_client.delete(f'{settings.JWT_USER_REDIS_PREFIX}:{request.user.id}')
125+
await redis_client.delete_prefix(f'{settings.JWT_USER_REDIS_PREFIX}')
126126
return count
127127

128128
@staticmethod

0 commit comments

Comments
 (0)