14 lines
216 B
Go
14 lines
216 B
Go
package util
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitea.local/admin/hspguard/internal/types"
|
|
)
|
|
|
|
func GetRequestUserId(ctx context.Context) (string, bool) {
|
|
userId, ok := ctx.Value(types.UserIdKey).(string)
|
|
return userId, ok
|
|
}
|
|
|