Skip to content

Commit

Permalink
fix: spec
Browse files Browse the repository at this point in the history
  • Loading branch information
barisusakli committed Oct 2, 2020
1 parent c95a389 commit fbd8568
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 15 deletions.
34 changes: 21 additions & 13 deletions public/openapi/api/post-queue.yaml
Expand Up @@ -47,28 +47,36 @@ get:
items:
type: object
properties:
bgColor:
type: string
cid:
type: number
color:
type: string
disabledClass:
nullable: true
icon:
type: string
imageClass:
description: A category identifier
name:
type: string
level:
type: string
link:
type: string
name:
icon:
type: string
parentCid:
type: number
slug:
description: The category identifier for the category that is the immediate
ancestor of the current category
color:
type: string
bgColor:
type: string
selected:
type: boolean
imageClass:
type: string
required:
- bgColor
- cid
- color
- icon
- imageClass
- level
- name
- parentCid
allCategoriesUrl:
type: string
selectedCategory:
Expand Down
10 changes: 10 additions & 0 deletions public/openapi/api/unread.yaml
Expand Up @@ -253,6 +253,16 @@ get:
type: string
allCategoriesUrl:
type: string
selectedCategory:
type: object
properties:
icon:
type: string
name:
type: string
bgColor:
type: string
nullable: true
selectedCids:
type: array
items:
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/helpers.js
Expand Up @@ -281,7 +281,7 @@ async function getCategoryData(cids, uid, selectedCid, states, privilege) {
} else if (selectedCategory.length === 1) {
selectedCategory = selectedCategory[0];
} else {
selectedCategory = undefined;
selectedCategory = null;
}

return {
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/recent.js
Expand Up @@ -65,7 +65,7 @@ recentController.getData = async function (req, url, sort) {
data.showTopicTools = isPrivileged;
data.categories = categoryData.categories;
data.allCategoriesUrl = url + helpers.buildQueryString(req.query, 'cid', '');
data.selectedCategory = categoryData.selectedCategory || null;
data.selectedCategory = categoryData.selectedCategory;
data.selectedCids = categoryData.selectedCids;
data['feeds:disableRSS'] = meta.config['feeds:disableRSS'] || 0;
data.rssFeedUrl = nconf.get('relative_path') + '/' + url + '.rss';
Expand Down

0 comments on commit fbd8568

Please sign in to comment.