handler: Fake login response.
This commit is contained in:
parent
eec88210f7
commit
d0bea1f11c
1 changed files with 6 additions and 0 deletions
|
|
@ -154,6 +154,12 @@ func (c *Config) HandleAll(w http.ResponseWriter, r *http.Request) {
|
|||
}
|
||||
|
||||
c.MakeResponse(nil, &http.Response{Body: io.NopCloser(strings.NewReader(strings.Join(body, "\n")))}, w)
|
||||
} else if strings.HasPrefix(r.URL.Path, "/api/v2/auth/login") {
|
||||
resp := http.Response{}
|
||||
resp.StatusCode = http.StatusOK
|
||||
resp.Body = io.NopCloser(strings.NewReader("Ok."))
|
||||
resp.Header.Add("Set-Cookie", "SID=w7UA+CZFdxQZylg0Y6T0Lzx/AQvRHMdV") // Fake it until you make it...
|
||||
c.MakeResponse(nil, &resp, w)
|
||||
} else if strings.HasPrefix(r.URL.Path, "/api/v2/sync/maindata") {
|
||||
log.Println("HandlerTorrentsInfo")
|
||||
resp, err := c.HandlerTorrentsMaindata(r)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue