mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-12 09:05:39 +00:00
fmt: Rebuilt ACL code to have less boilerplate (#397)
This commit is contained in:
@@ -57,10 +57,10 @@ func parseRequestMetadata(ctx context.Context, req *http.Request) metadata.MD {
|
||||
username, usergroup = parseHttpHeaderForAuth(req)
|
||||
}
|
||||
|
||||
md := metadata.Pairs(
|
||||
"username", username,
|
||||
"usergroup", usergroup,
|
||||
)
|
||||
md := metadata.New(map[string]string {
|
||||
"username": username,
|
||||
"usergroup": usergroup,
|
||||
})
|
||||
|
||||
log.Tracef("api request metadata: %+v", md)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user