Added login
This commit is contained in:
27
api.yaml
27
api.yaml
@@ -6,6 +6,33 @@ info:
|
|||||||
servers:
|
servers:
|
||||||
- url: 'http://localhost:8080'
|
- url: 'http://localhost:8080'
|
||||||
paths:
|
paths:
|
||||||
|
/api/login:
|
||||||
|
post:
|
||||||
|
summary: Login to an author account
|
||||||
|
requestBody:
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
username:
|
||||||
|
type: string
|
||||||
|
description: Username of the user / author which logs in
|
||||||
|
password:
|
||||||
|
type: string
|
||||||
|
description: Password of the user
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: Logged in
|
||||||
|
headers:
|
||||||
|
Set-Cookie:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: The session_id cookie to authenticate
|
||||||
|
401:
|
||||||
|
description: Login failed
|
||||||
|
|
||||||
/api/recent:
|
/api/recent:
|
||||||
get:
|
get:
|
||||||
summary: Get recent articles
|
summary: Get recent articles
|
||||||
|
|||||||
Reference in New Issue
Block a user