mirror of
https://github.com/usememos/memos.git
synced 2024-12-22 18:51:31 +03: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
|
||
|
}
|