Allow users to display news on homepage (+ configuring a dashboard homepage)

This commit is contained in:
2024-03-07 21:08:00 +00:00
committed by Julien Fastré
parent 2ad3bbe96f
commit d29415317b
45 changed files with 1873 additions and 81 deletions

View File

@@ -10,6 +10,12 @@ servers:
components:
schemas:
Date:
type: object
properties:
datetime:
type: string
format: date-time
User:
type: object
properties:
@@ -131,6 +137,35 @@ components:
id:
type: integer
DashboardConfigItem:
type: object
properties:
id:
type: integer
type:
type: string
metadata:
type: object
userId:
type: integer
position:
type: string
NewsItem:
type: object
properties:
id:
type: integer
title:
type: string
content:
type: string
startDate:
$ref: "#/components/schemas/Date"
endDate:
$ref: "#/components/schemas/Date"
paths:
/1.0/search.json:
get:
@@ -842,4 +877,34 @@ paths:
$ref: '#/components/schemas/Workflow'
403:
description: "Unauthorized"
/1.0/main/dashboard-config-item.json:
get:
tags:
- dashboard config item
summary: Returns the dashboard configuration for the current user.
responses:
200:
description: "ok"
content:
application/json:
schema:
$ref: '#/components/schemas/DashboardConfigItem'
403:
description: "Unauthorized"
/1.0/main/news/current.json:
get:
tags:
- news items
summary: Returns a list of news items which are valid
responses:
200:
description: "ok"
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/NewsItem'
403:
description: "Unauthorized"