mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
init project
This commit is contained in:
11
api/utils.go
Normal file
11
api/utils.go
Normal file
@ -0,0 +1,11 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func GetUserIdInCookie(r *http.Request) (string, error) {
|
||||
userIdCookie, err := r.Cookie("user_id")
|
||||
|
||||
return userIdCookie.Value, err
|
||||
}
|
Reference in New Issue
Block a user