From 0401ee6d01ea638449cea555bed9cdf5b26dd5fe Mon Sep 17 00:00:00 2001 From: dtomlinson Date: Mon, 27 Apr 2020 03:13:14 +0100 Subject: [PATCH] updating api after rebuild --- api/about/config/routes.json | 28 + api/about/controllers/about.js | 8 + api/about/documentation/1.0.0/about.json | 416 ++++++++++++ api/about/models/about.js | 55 ++ api/about/models/about.settings.json | 33 + api/about/services/about.js | 8 + .../1.0.0/full_documentation.json | 604 ++++++++++++++++-- extensions/upload/config/settings.js | 15 + 8 files changed, 1120 insertions(+), 47 deletions(-) create mode 100644 api/about/config/routes.json create mode 100644 api/about/controllers/about.js create mode 100644 api/about/documentation/1.0.0/about.json create mode 100644 api/about/models/about.js create mode 100644 api/about/models/about.settings.json create mode 100644 api/about/services/about.js create mode 100644 extensions/upload/config/settings.js diff --git a/api/about/config/routes.json b/api/about/config/routes.json new file mode 100644 index 0000000..ad27c21 --- /dev/null +++ b/api/about/config/routes.json @@ -0,0 +1,28 @@ +{ + "routes": [ + { + "method": "GET", + "path": "/about", + "handler": "about.find", + "config": { + "policies": [] + } + }, + { + "method": "PUT", + "path": "/about", + "handler": "about.update", + "config": { + "policies": [] + } + }, + { + "method": "DELETE", + "path": "/about", + "handler": "about.delete", + "config": { + "policies": [] + } + } + ] +} diff --git a/api/about/controllers/about.js b/api/about/controllers/about.js new file mode 100644 index 0000000..f94f227 --- /dev/null +++ b/api/about/controllers/about.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/controllers.html#core-controllers) + * to customize this controller + */ + +module.exports = {}; diff --git a/api/about/documentation/1.0.0/about.json b/api/about/documentation/1.0.0/about.json new file mode 100644 index 0000000..153ef73 --- /dev/null +++ b/api/about/documentation/1.0.0/about.json @@ -0,0 +1,416 @@ +{ + "paths": { + "/about": { + "get": { + "deprecated": false, + "description": "Find all the about's records", + "responses": { + "200": { + "description": "Retrieve about document(s)", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/About" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "About" + ], + "parameters": [ + { + "name": "_limit", + "in": "query", + "required": false, + "description": "Maximum number of results possible", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "_sort", + "in": "query", + "required": false, + "description": "Sort according to a specific field.", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_start", + "in": "query", + "required": false, + "description": "Skip a specific number of entries (especially useful for pagination)", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "=", + "in": "query", + "required": false, + "description": "Get entries that matches exactly your input", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_ne", + "in": "query", + "required": false, + "description": "Get records that are not equals to something", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lt", + "in": "query", + "required": false, + "description": "Get record that are lower than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lte", + "in": "query", + "required": false, + "description": "Get records that are lower than or equal to a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gt", + "in": "query", + "required": false, + "description": "Get records that are greater than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gte", + "in": "query", + "required": false, + "description": "Get records that are greater than or equal a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_contains", + "in": "query", + "required": false, + "description": "Get records that contains a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_containss", + "in": "query", + "required": false, + "description": "Get records that contains (case sensitive) a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_in", + "in": "query", + "required": false, + "description": "Get records that matches any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + }, + { + "name": "_nin", + "in": "query", + "required": false, + "description": "Get records that doesn't match any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + } + ] + }, + "put": { + "deprecated": false, + "description": "Update a single about record", + "responses": { + "200": { + "description": "Retrieve about document(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/About" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "About" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewAbout" + } + } + } + }, + "parameters": [] + }, + "delete": { + "deprecated": false, + "description": "Delete a single about record", + "responses": { + "200": { + "description": "deletes a single about based on the ID supplied", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "About" + ], + "parameters": [] + } + } + }, + "components": { + "schemas": { + "About": { + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + }, + "Content": { + "type": "string" + }, + "Title": { + "type": "string" + }, + "Video": { + "type": "array", + "items": { + "required": [ + "id", + "name", + "hash", + "mime", + "size", + "url", + "provider" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": { + "type": "object" + }, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": { + "type": "object" + }, + "related": { + "type": "string" + } + } + } + }, + "Optionextra": { + "type": "string" + } + } + }, + "NewAbout": { + "properties": { + "Content": { + "type": "string" + }, + "Title": { + "type": "string" + }, + "Optionextra": { + "type": "string" + } + } + } + } + }, + "tags": [ + { + "name": "About" + } + ] +} \ No newline at end of file diff --git a/api/about/models/about.js b/api/about/models/about.js new file mode 100644 index 0000000..1ff7a18 --- /dev/null +++ b/api/about/models/about.js @@ -0,0 +1,55 @@ +'use strict'; + +/** + * Lifecycle callbacks for the `about` model. + */ + +module.exports = { + // Before saving a value. + // Fired before an `insert` or `update` query. + // beforeSave: async (model, attrs, options) => {}, + + // After saving a value. + // Fired after an `insert` or `update` query. + // afterSave: async (model, response, options) => {}, + + // Before fetching a value. + // Fired before a `fetch` operation. + // beforeFetch: async (model, columns, options) => {}, + + // After fetching a value. + // Fired after a `fetch` operation. + // afterFetch: async (model, response, options) => {}, + + // Before fetching all values. + // Fired before a `fetchAll` operation. + // beforeFetchAll: async (model, columns, options) => {}, + + // After fetching all values. + // Fired after a `fetchAll` operation. + // afterFetchAll: async (model, response, options) => {}, + + // Before creating a value. + // Fired before an `insert` query. + // beforeCreate: async (model, attrs, options) => {}, + + // After creating a value. + // Fired after an `insert` query. + // afterCreate: async (model, attrs, options) => {}, + + // Before updating a value. + // Fired before an `update` query. + // beforeUpdate: async (model, attrs, options) => {}, + + // After updating a value. + // Fired after an `update` query. + // afterUpdate: async (model, attrs, options) => {}, + + // Before destroying a value. + // Fired before a `delete` query. + // beforeDestroy: async (model, attrs, options) => {}, + + // After destroying a value. + // Fired after a `delete` query. + // afterDestroy: async (model, attrs, options) => {} +}; diff --git a/api/about/models/about.settings.json b/api/about/models/about.settings.json new file mode 100644 index 0000000..5d81d3b --- /dev/null +++ b/api/about/models/about.settings.json @@ -0,0 +1,33 @@ +{ + "kind": "singleType", + "collectionName": "abouts", + "info": { + "name": "About" + }, + "options": { + "increments": true, + "timestamps": true + }, + "attributes": { + "Content": { + "type": "richtext" + }, + "Title": { + "type": "string" + }, + "Video": { + "collection": "file", + "via": "related", + "allowedTypes": [ + "images", + "files", + "videos" + ], + "plugin": "upload", + "required": false + }, + "Optionextra": { + "type": "richtext" + } + } +} diff --git a/api/about/services/about.js b/api/about/services/about.js new file mode 100644 index 0000000..d0dcc88 --- /dev/null +++ b/api/about/services/about.js @@ -0,0 +1,8 @@ +'use strict'; + +/** + * Read the documentation (https://strapi.io/documentation/3.0.0-beta.x/concepts/services.html#core-services) + * to customize this service + */ + +module.exports = {}; diff --git a/extensions/documentation/documentation/1.0.0/full_documentation.json b/extensions/documentation/documentation/1.0.0/full_documentation.json index 1de2ffb..18b22bc 100644 --- a/extensions/documentation/documentation/1.0.0/full_documentation.json +++ b/extensions/documentation/documentation/1.0.0/full_documentation.json @@ -14,7 +14,7 @@ "name": "Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, - "x-generation-date": "04/26/2020 5:27:45 PM" + "x-generation-date": "04/26/2020 9:40:09 PM" }, "x-strapi-config": { "path": "/documentation", @@ -45,6 +45,313 @@ } ], "paths": { + "/about": { + "get": { + "deprecated": false, + "description": "Find all the about's records", + "responses": { + "200": { + "description": "Retrieve about document(s)", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/About" + } + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "About" + ], + "parameters": [ + { + "name": "_limit", + "in": "query", + "required": false, + "description": "Maximum number of results possible", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "_sort", + "in": "query", + "required": false, + "description": "Sort according to a specific field.", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_start", + "in": "query", + "required": false, + "description": "Skip a specific number of entries (especially useful for pagination)", + "schema": { + "type": "integer" + }, + "deprecated": false + }, + { + "name": "=", + "in": "query", + "required": false, + "description": "Get entries that matches exactly your input", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_ne", + "in": "query", + "required": false, + "description": "Get records that are not equals to something", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lt", + "in": "query", + "required": false, + "description": "Get record that are lower than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_lte", + "in": "query", + "required": false, + "description": "Get records that are lower than or equal to a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gt", + "in": "query", + "required": false, + "description": "Get records that are greater than a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_gte", + "in": "query", + "required": false, + "description": "Get records that are greater than or equal a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_contains", + "in": "query", + "required": false, + "description": "Get records that contains a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_containss", + "in": "query", + "required": false, + "description": "Get records that contains (case sensitive) a value", + "schema": { + "type": "string" + }, + "deprecated": false + }, + { + "name": "_in", + "in": "query", + "required": false, + "description": "Get records that matches any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + }, + { + "name": "_nin", + "in": "query", + "required": false, + "description": "Get records that doesn't match any value in the array of values", + "schema": { + "type": "array", + "items": { + "type": "string" + } + }, + "deprecated": false + } + ] + }, + "put": { + "deprecated": false, + "description": "Update a single about record", + "responses": { + "200": { + "description": "Retrieve about document(s)", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/About" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "About" + ], + "requestBody": { + "description": "", + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/NewAbout" + } + } + } + }, + "parameters": [] + }, + "delete": { + "deprecated": false, + "description": "Delete a single about record", + "responses": { + "200": { + "description": "deletes a single about based on the ID supplied", + "content": { + "application/json": { + "schema": { + "type": "integer", + "format": "int64" + } + } + } + }, + "403": { + "description": "Forbidden", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "default": { + "description": "unexpected error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + } + }, + "summary": "", + "tags": [ + "About" + ], + "parameters": [] + } + }, "/homepage": { "get": { "deprecated": false, @@ -95,7 +402,9 @@ } }, "summary": "", - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "parameters": [ { "name": "_limit", @@ -281,7 +590,9 @@ } }, "summary": "", - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "requestBody": { "description": "", "required": true, @@ -342,7 +653,9 @@ } }, "summary": "", - "tags": ["Homepage"], + "tags": [ + "Homepage" + ], "parameters": [] } }, @@ -396,7 +709,9 @@ } }, "summary": "", - "tags": ["Test"], + "tags": [ + "Test" + ], "parameters": [ { "name": "_limit", @@ -582,7 +897,9 @@ } }, "summary": "", - "tags": ["Test"], + "tags": [ + "Test" + ], "requestBody": { "description": "", "required": true, @@ -647,7 +964,9 @@ } }, "summary": "", - "tags": ["Test"], + "tags": [ + "Test" + ], "parameters": [] } }, @@ -698,7 +1017,9 @@ } }, "summary": "", - "tags": ["Test"], + "tags": [ + "Test" + ], "parameters": [ { "name": "id", @@ -758,7 +1079,9 @@ } }, "summary": "", - "tags": ["Test"], + "tags": [ + "Test" + ], "requestBody": { "description": "", "required": true, @@ -830,7 +1153,9 @@ } }, "summary": "", - "tags": ["Test"], + "tags": [ + "Test" + ], "parameters": [ { "name": "id", @@ -896,7 +1221,9 @@ } }, "summary": "", - "tags": ["Email - Email"], + "tags": [ + "Email - Email" + ], "requestBody": { "description": "", "required": true, @@ -965,7 +1292,9 @@ } }, "summary": "", - "tags": ["Upload - File"], + "tags": [ + "Upload - File" + ], "requestBody": { "description": "", "required": true, @@ -1034,7 +1363,9 @@ } }, "summary": "", - "tags": ["Upload - File"], + "tags": [ + "Upload - File" + ], "parameters": [] } }, @@ -1089,7 +1420,9 @@ } }, "summary": "", - "tags": ["Upload - File"], + "tags": [ + "Upload - File" + ], "parameters": [] } }, @@ -1144,7 +1477,9 @@ } }, "summary": "", - "tags": ["Upload - File"], + "tags": [ + "Upload - File" + ], "parameters": [ { "name": "id", @@ -1208,7 +1543,9 @@ } }, "summary": "", - "tags": ["Upload - File"], + "tags": [ + "Upload - File" + ], "parameters": [ { "name": "id", @@ -1274,7 +1611,9 @@ } }, "summary": "", - "tags": ["Upload - File"], + "tags": [ + "Upload - File" + ], "parameters": [ { "name": "id", @@ -1340,7 +1679,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - Role"], + "tags": [ + "UsersPermissions - Role" + ], "parameters": [] } }, @@ -1391,7 +1732,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - Role"], + "tags": [ + "UsersPermissions - Role" + ], "parameters": [ { "name": "id", @@ -1456,7 +1799,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - Role"], + "tags": [ + "UsersPermissions - Role" + ], "parameters": [ { "name": "_limit", @@ -1642,7 +1987,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - Role"], + "tags": [ + "UsersPermissions - Role" + ], "requestBody": { "description": "", "required": true, @@ -1703,7 +2050,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - Role"], + "tags": [ + "UsersPermissions - Role" + ], "parameters": [ { "name": "role", @@ -1778,7 +2127,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - Role"], + "tags": [ + "UsersPermissions - Role" + ], "parameters": [ { "name": "role", @@ -1843,7 +2194,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "parameters": [ { "name": "id", @@ -2045,7 +2398,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "parameters": [] } }, @@ -2100,7 +2455,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "requestBody": { "description": "", "required": true, @@ -2165,7 +2522,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "requestBody": { "description": "", "required": true, @@ -2230,7 +2589,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "parameters": [ { "name": "provider", @@ -2296,7 +2657,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "requestBody": { "description": "", "required": true, @@ -2365,7 +2728,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "requestBody": { "description": "", "required": true, @@ -2434,7 +2799,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "parameters": [] } }, @@ -2489,7 +2856,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "requestBody": { "description": "", "required": true, @@ -2557,7 +2926,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "parameters": [ { "name": "_limit", @@ -2745,7 +3116,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "parameters": [] } }, @@ -2796,7 +3169,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "parameters": [ { "name": "id", @@ -2856,7 +3231,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "parameters": [ { "name": "id", @@ -2931,7 +3308,9 @@ } }, "summary": "", - "tags": ["UsersPermissions - User"], + "tags": [ + "UsersPermissions - User" + ], "parameters": [ { "name": "id", @@ -2949,8 +3328,106 @@ }, "components": { "schemas": { + "About": { + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string" + }, + "Content": { + "type": "string" + }, + "Title": { + "type": "string" + }, + "Video": { + "type": "array", + "items": { + "required": [ + "id", + "name", + "hash", + "mime", + "size", + "url", + "provider" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "alternativeText": { + "type": "string" + }, + "caption": { + "type": "string" + }, + "width": { + "type": "integer" + }, + "height": { + "type": "integer" + }, + "formats": { + "type": "object" + }, + "hash": { + "type": "string" + }, + "ext": { + "type": "string" + }, + "mime": { + "type": "string" + }, + "size": { + "type": "number" + }, + "url": { + "type": "string" + }, + "previewUrl": { + "type": "string" + }, + "provider": { + "type": "string" + }, + "provider_metadata": { + "type": "object" + }, + "related": { + "type": "string" + } + } + } + }, + "Optionextra": { + "type": "string" + } + } + }, + "NewAbout": { + "properties": { + "Content": { + "type": "string" + }, + "Title": { + "type": "string" + }, + "Optionextra": { + "type": "string" + } + } + }, "Homepage": { - "required": ["id"], + "required": [ + "id" + ], "properties": { "id": { "type": "string" @@ -3178,7 +3655,9 @@ } }, "Test": { - "required": ["id"], + "required": [ + "id" + ], "properties": { "id": { "type": "string" @@ -3196,7 +3675,10 @@ } }, "UsersPermissionsRole": { - "required": ["id", "name"], + "required": [ + "id", + "name" + ], "properties": { "id": { "type": "string" @@ -3214,7 +3696,13 @@ "permissions": { "type": "array", "items": { - "required": ["id", "type", "controller", "action", "enabled"], + "required": [ + "id", + "type", + "controller", + "action", + "enabled" + ], "properties": { "id": { "type": "string" @@ -3243,7 +3731,11 @@ "users": { "type": "array", "items": { - "required": ["id", "username", "email"], + "required": [ + "id", + "username", + "email" + ], "properties": { "id": { "type": "string" @@ -3278,7 +3770,9 @@ } }, "NewUsersPermissionsRole": { - "required": ["name"], + "required": [ + "name" + ], "properties": { "name": { "type": "string", @@ -3305,7 +3799,11 @@ } }, "UsersPermissionsUser": { - "required": ["id", "username", "email"], + "required": [ + "id", + "username", + "email" + ], "properties": { "id": { "type": "string" @@ -3330,7 +3828,10 @@ "default": false }, "role": { - "required": ["id", "name"], + "required": [ + "id", + "name" + ], "properties": { "id": { "type": "string" @@ -3361,7 +3862,10 @@ } }, "NewUsersPermissionsUser": { - "required": ["username", "email"], + "required": [ + "username", + "email" + ], "properties": { "username": { "type": "string", @@ -3395,7 +3899,10 @@ } }, "Error": { - "required": ["code", "message"], + "required": [ + "code", + "message" + ], "properties": { "code": { "type": "integer", @@ -3416,6 +3923,9 @@ } }, "tags": [ + { + "name": "About" + }, { "name": "Homepage" }, diff --git a/extensions/upload/config/settings.js b/extensions/upload/config/settings.js new file mode 100644 index 0000000..09e25f7 --- /dev/null +++ b/extensions/upload/config/settings.js @@ -0,0 +1,15 @@ +if (process.env.NODE_ENV === "production") { + module.exports = { + provider: "aws-s3", + providerOptions: { + accessKeyId: process.env.STRAPI_S3_ACCESS_KEY, + secretAccessKey: process.env.STRAPI_S3_SECRET_KEY, + region: process.env.STRAPI_S3_REGION, + params: { + Bucket: process.env.STRAPI_S3_BUCKET, + }, + }, + }; +} else { + module.exports = {}; +}