This is a fast deployment / easy-to-use Node.js server.
The commits must follow the rules specified in the doitmentation, in order to be accepted for merging.
Runs the server in the development mode.
=======================================================================================================
Informations about microservice's endpoints
This enndpoint is located inside multiple controllers. Used for mqtt sync. Return all records of a collection.
Creates a user record based on request's input. Includes validation. Return userId
Data Example
{
"userId": "f0ea4e43-545c-4f8f-8c2a-6fe5af1c48c5",
"username": "username",
"firstname": "firstname",
"lastname": "lastname",
"email":{
"email": "something@else.com",
"verified": false
},
"status": "active",
"banned": false
}
Recieve userId and performe a db query to find if the user has active subscriptions.
Returns subscribed: true
if user has active subcriptions and subscribed: false
otherwise.
Data Example
?userId=f0ea4e43-545c-4f8f-8c2a-6fe5af1c48c5
Requires userId. Performes a db query to find this user's tool. Returns data in the following form. Includes auth.checkAdmin.
{
"tools": [
"Google Ads"
]
}
Data Example
?userId=f0ea4e43-545c-4f8f-8c2a-6fe5af1c48c5
Creates a configuration record based on request's input. Field status is hardcoded to 'incomplete'. Includes validation. Return the new configuration record.
Data Example
{
"userId": "userId",
"name": "temp-web-app",
"submitted": {
"0": "something",
"1": "somethingelse"
},
"pageNo": 2
}
Search the db for "status:incomplete" records that matches the query parameters. Query params are userId and name. Return the matched configuration records.
Data Example
?userId=f0ea4e43-545c-4f8f-8c2a-6fe5af1c48c5&name=temp-web-app
Only includes one endpoint, the getAll (explained on top)
Search the db for one record that matches the query parameters. Query params are lang and name. Return the matched wizard record.
Data Example
?lang=el&name=ERISED_MAIN_FLOW
Search the db for records that matches the query parameter. Query param is lang. Return the matched wizard records.
Data Example
?lang=el
Creates a wizard record based on request's input. Includes validation. Return the new wizard record.
Data Example
{
"lang": "el",
"name": "TEMP_NAME_FLOW",
"questions": [
{
"title": "temp",
"type": "CHECKBOX_WITH_TEXT",
"answers": [
"Απάντηση1",
"Απάντηση2"
],
"pageNo": 0,
"skippable": false
},
{
"title": "temp2",
"type": "CHECKBOX",
"answers": [
"Απάντηση5",
"Απάντηση6",
"Απάντηση7"
],
"pageNo": 1,
"skippable": false
}
],
"styles": [
"tempStyle1",
"tempStyle2"
]
}
Updates a wizard record that matches the given lang and name. Updatable fields are questions and styles. Includes validation. Return the new wizard record.
Data Example
{
"lang": "de",
"name": "ERISED_MAIN_FLOW",
"questions": [
{
"title": "temdddp",
"type": "CHECKBOX_WITH_TEXT",
"answers": [
"Απάντηση1",
"Απάντηση2"
],
"pageNo": 0,
"skippable": false
},
{
"title": "temp2",
"type": "CHECKBOX",
"answers": [
"Απάντηση5",
"Απάντηση6",
"Απάντηση7"
],
"pageNo": 1,
"skippable": false
}
],
"styles": [
"tempStyle1",
"tempStyle2"
]
}
Used for server db cloning sync (mqtt). Hardcoded messages are broadcasted to all microservices/# subscribers. Return 'SUCCESS' or 'FAILED' depended on errors during publishing.
Used for the translation tool. Takes no parameters. Configuration is needed in the config file.
Returned Data Example
{
"client": "erised-web-app",
"missing": [
{
"lang": "de",
"keys": [
"HOME",
"ABOUT"
]
},
{
"lang": "el",
"keys": [
"ABOUT",
"CONTACT"
]
},
{
"lang": "it",
"keys": [
"HOME",
"ABOUT",
"CONTACT"
]
}
]
}
Require the express-fileupload middleware. Link: https://www.npmjs.com/package/express-fileupload
Receives an png image and uploads it to Minio.