mirror of
https://github.com/usememos/memos.git
synced 2025-02-22 22:27:37 +01: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
|
|
}
|