mirror of
https://github.com/usememos/memos.git
synced 2024-11-15 03:07:04 +08:00
12 lines
172 B
Go
12 lines
172 B
Go
|
package api
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func GetUserIdInCookie(r *http.Request) (string, error) {
|
||
|
userIdCookie, err := r.Cookie("user_id")
|
||
|
|
||
|
return userIdCookie.Value, err
|
||
|
}
|