Added login
This commit is contained in:
27
api.yaml
27
api.yaml
@@ -6,6 +6,33 @@ info:
|
||||
servers:
|
||||
- url: 'http://localhost:8080'
|
||||
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:
|
||||
get:
|
||||
summary: Get recent articles
|
||||
|
||||
Reference in New Issue
Block a user