mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
172 B
Go
12 lines
172 B
Go
4 years ago
|
package api
|
||
|
|
||
|
import (
|
||
|
"net/http"
|
||
|
)
|
||
|
|
||
|
func GetUserIdInCookie(r *http.Request) (string, error) {
|
||
|
userIdCookie, err := r.Cookie("user_id")
|
||
|
|
||
|
return userIdCookie.Value, err
|
||
|
}
|