test(singleuser): add tests for singleuser apis

This commit is contained in:
hexxa 2020-12-06 14:32:45 +08:00
parent 2bcb337b4c
commit 24adbcbe63
11 changed files with 265 additions and 82 deletions

12
src/client/utils.go Normal file
View file

@ -0,0 +1,12 @@
package client
import "net/http"
func GetCookie(cookies []*http.Cookie, name string) *http.Cookie {
for _, c := range cookies {
if c.Name == name {
return c
}
}
return nil
}