Skip to content

Commit

Permalink
Remove Chinese comments & fix typo (#725)
Browse files Browse the repository at this point in the history
* Fix typo

* Remove Chinese comments
  • Loading branch information
hiveer authored Oct 21, 2024
1 parent 7b809e1 commit 53c25ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/new_admin/AdminNavbar.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div class="w-full h-[60px] bg-[#1C7A6C]">
<div class="max-w-[1280px] m-auto h-full flex justify-between items-center">
<p class="font-[700] text-white"> OpenCSG Admin Pannel </p>
<p class="font-[700] text-white"> OpenCSG Admin Panel </p>
<a href="/" target="_blank" class="font-[500] text-white underline"> Open Site </a>
<p class="text-white">{{ userName }} ( {{ userRoles }} )</p>
</div>
Expand Down
4 changes: 2 additions & 2 deletions internal/middleware/auth_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"opencsg.com/portal/pkg/utils/jwt"
)

// AuthMiddleware 验证用户登录状态的中间件
// check user login status and save the current user to context
func AuthMiddleware(csghubServer backend.Server) gin.HandlerFunc {
return func(c *gin.Context) {
loginIdentity, err := c.Cookie("login_identity")
Expand All @@ -18,7 +18,7 @@ func AuthMiddleware(csghubServer backend.Server) gin.HandlerFunc {
return
}

// 每次请求从 csghub server 后台获取用户的信息
// get user info from csghub server
userResp, _, err := csghubServer.GetUserInfo(loginIdentity)
user := &models.User{
Name: userResp.Data.Username,
Expand Down

0 comments on commit 53c25ac

Please sign in to comment.