Feat: add login
This commit is contained in:
31
docs/docs.go
31
docs/docs.go
@@ -231,6 +231,29 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/login": {
|
||||
"post": {
|
||||
"parameters": [
|
||||
{
|
||||
"description": "payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/auth.postLoginInput"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"302": {
|
||||
"description": "redirect to root page",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -280,6 +303,14 @@ const docTemplate = `{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth.postLoginInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
@@ -223,6 +223,29 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/auth/login": {
|
||||
"post": {
|
||||
"parameters": [
|
||||
{
|
||||
"description": "payload",
|
||||
"name": "payload",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/auth.postLoginInput"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"302": {
|
||||
"description": "redirect to root page",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
@@ -272,6 +295,14 @@
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"auth.postLoginInput": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,6 +30,11 @@ definitions:
|
||||
loginUrl:
|
||||
type: string
|
||||
type: object
|
||||
auth.postLoginInput:
|
||||
properties:
|
||||
token:
|
||||
type: string
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
license:
|
||||
@@ -176,4 +181,18 @@ paths:
|
||||
$ref: '#/definitions/auth.postGenLoginUrlOutput'
|
||||
"400":
|
||||
description: Bad Request
|
||||
/auth/login:
|
||||
post:
|
||||
parameters:
|
||||
- description: payload
|
||||
in: body
|
||||
name: payload
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/auth.postLoginInput'
|
||||
responses:
|
||||
"302":
|
||||
description: redirect to root page
|
||||
schema:
|
||||
type: string
|
||||
swagger: "2.0"
|
||||
|
||||
Reference in New Issue
Block a user