mirror of
https://github.com/usememos/memos.git
synced 2024-12-22 10:41:30 +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
|
|
}
|