v0.9.0 user and session management improvement, xterm.js addons
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
// FILE: lixenwraith/chess/internal/api/client.go
|
||||
package api
|
||||
|
||||
import (
|
||||
@ -226,6 +225,10 @@ func (c *Client) Login(identifier, password string) (*AuthResponse, error) {
|
||||
return &resp, err
|
||||
}
|
||||
|
||||
func (c *Client) Logout() error {
|
||||
return c.doRequest("POST", "/api/v1/auth/logout", nil, nil)
|
||||
}
|
||||
|
||||
func (c *Client) GetCurrentUser() (*UserResponse, error) {
|
||||
var resp UserResponse
|
||||
err := c.doRequest("GET", "/api/v1/auth/me", nil, &resp)
|
||||
|
||||
Reference in New Issue
Block a user