mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: add api docs (#1965)
This commit is contained in:
@ -33,6 +33,7 @@ type SignUp struct {
|
||||
}
|
||||
|
||||
func (s *APIV1Service) registerAuthRoutes(g *echo.Group) {
|
||||
// POST /auth/signin - Sign in.
|
||||
g.POST("/auth/signin", func(c echo.Context) error {
|
||||
ctx := c.Request().Context()
|
||||
signin := &SignIn{}
|
||||
@ -67,6 +68,7 @@ func (s *APIV1Service) registerAuthRoutes(g *echo.Group) {
|
||||
return c.JSON(http.StatusOK, user)
|
||||
})
|
||||
|
||||
// POST /auth/signin/sso - Sign in with SSO
|
||||
g.POST("/auth/signin/sso", func(c echo.Context) error {
|
||||
ctx := c.Request().Context()
|
||||
signin := &SSOSignIn{}
|
||||
@ -153,6 +155,7 @@ func (s *APIV1Service) registerAuthRoutes(g *echo.Group) {
|
||||
return c.JSON(http.StatusOK, user)
|
||||
})
|
||||
|
||||
// POST /auth/signup - Sign up a new user.
|
||||
g.POST("/auth/signup", func(c echo.Context) error {
|
||||
ctx := c.Request().Context()
|
||||
signup := &SignUp{}
|
||||
@ -218,6 +221,7 @@ func (s *APIV1Service) registerAuthRoutes(g *echo.Group) {
|
||||
return c.JSON(http.StatusOK, user)
|
||||
})
|
||||
|
||||
// POST /auth/signout - Sign out.
|
||||
g.POST("/auth/signout", func(c echo.Context) error {
|
||||
auth.RemoveTokensAndCookies(c)
|
||||
return c.JSON(http.StatusOK, true)
|
||||
|
Reference in New Issue
Block a user