chore: Unify term types
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /terms/{type}:
|
||||
* /terms:
|
||||
* get:
|
||||
* summary: Get terms and conditions
|
||||
* description: Retrieves terms and conditions in the specified language.
|
||||
@@ -13,14 +13,6 @@
|
||||
* - Terms
|
||||
* operationId: getTerms
|
||||
* parameters:
|
||||
* - name: type
|
||||
* in: path
|
||||
* required: true
|
||||
* description: Type of terms to retrieve
|
||||
* schema:
|
||||
* type: string
|
||||
* enum: [general, extended]
|
||||
* example: general
|
||||
* - name: language
|
||||
* in: query
|
||||
* required: false
|
||||
@@ -47,11 +39,6 @@
|
||||
* - content
|
||||
* - signature
|
||||
* properties:
|
||||
* type:
|
||||
* type: string
|
||||
* enum: [general, extended]
|
||||
* description: Type of terms
|
||||
* example: general
|
||||
* language:
|
||||
* type: string
|
||||
* enum: [de-DE, en-US]
|
||||
@@ -76,11 +63,6 @@
|
||||
|
||||
module.exports = {
|
||||
inputs: {
|
||||
type: {
|
||||
type: 'string',
|
||||
isIn: Object.values(sails.hooks.terms.Types),
|
||||
required: true,
|
||||
},
|
||||
language: {
|
||||
type: 'string',
|
||||
isIn: User.LANGUAGES,
|
||||
@@ -88,7 +70,7 @@ module.exports = {
|
||||
},
|
||||
|
||||
async fn(inputs) {
|
||||
const terms = await sails.hooks.terms.getPayload(inputs.type, inputs.language);
|
||||
const terms = await sails.hooks.terms.getPayload(inputs.language);
|
||||
|
||||
return {
|
||||
item: terms,
|
||||
|
||||
Reference in New Issue
Block a user