Skip to content

Commit

Permalink
Merge pull request #524 from openBackhaul/develop
Browse files Browse the repository at this point in the history
RegistryOffice v2.1.0_spec
  • Loading branch information
openBackhaul authored Dec 10, 2023
2 parents 4024109 + 617071d commit 55caaef
Show file tree
Hide file tree
Showing 30 changed files with 21,084 additions and 20,677 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/eslint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Run eslint

on:
pull_request:
branches:
- develop

jobs:
eslint:
name: Run eslint
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: npm install
working-directory: server

- name: Run ESLint
run: ./node_modules/.bin/eslint .
working-directory: server
25 changes: 25 additions & 0 deletions server/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"commonjs": true,
"es2021": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": "latest"
},
"rules": {
"no-async-promise-executor": "off"
},
"overrides": [
{
"files": [
"**/*.spec.js",
"**/*.test.js"
],
"env": {
"jest": true
}
}
]
}
5 changes: 5 additions & 0 deletions server/controllers/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"rules": {
"no-unused-vars": "off"
}
}
56 changes: 28 additions & 28 deletions server/controllers/ActionProfile.js
Original file line number Diff line number Diff line change
@@ -1,85 +1,85 @@
//@ts-check
'use strict';

var utils = require('../utils/writer.js');
var ActionProfile = require('../service/ActionProfileService');
var responseBuilder = require('onf-core-model-ap/applicationPattern/rest/server/ResponseBuilder');
var responseCodeEnum = require('onf-core-model-ap/applicationPattern/rest/server/ResponseCode');
var oamLogService = require('onf-core-model-ap/applicationPattern/services/OamLogService');
var ResponseBuilder = require('onf-core-model-ap/applicationPattern/rest/server/ResponseBuilder');
var ResponseCode = require('onf-core-model-ap/applicationPattern/rest/server/ResponseCode');
var OamLogService = require('onf-core-model-ap/applicationPattern/services/OamLogService');

module.exports.getActionProfileConsequentOperationReference = async function getActionProfileConsequentOperationReference (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
let responseCode = ResponseCode.code.OK;
await ActionProfile.getActionProfileConsequentOperationReference(req.url)
.then(function (response) {
responseBuilder.buildResponse(res, responseCode, response);
ResponseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
let sentResp = responseBuilder.buildResponse(res, undefined, response);
let sentResp = ResponseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
OamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.getActionProfileDisplayInNewBrowserWindow = async function getActionProfileDisplayInNewBrowserWindow (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
let responseCode = ResponseCode.code.OK;
await ActionProfile.getActionProfileDisplayInNewBrowserWindow(req.url)
.then(function (response) {
responseBuilder.buildResponse(res, responseCode, response);
ResponseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
let sentResp = responseBuilder.buildResponse(res, undefined, response);
let sentResp = ResponseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
OamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.getActionProfileInputValueListt = async function getActionProfileInputValueListt (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
let responseCode = ResponseCode.code.OK;
await ActionProfile.getActionProfileInputValueListt(req.url)
.then(function (response) {
responseBuilder.buildResponse(res, responseCode, response);
ResponseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
let sentResp = responseBuilder.buildResponse(res, undefined, response);
let sentResp = ResponseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
OamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.getActionProfileLabel = async function getActionProfileLabel (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
let responseCode = ResponseCode.code.OK;
await ActionProfile.getActionProfileLabel(req.url)
.then(function (response) {
responseBuilder.buildResponse(res, responseCode, response);
ResponseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
let sentResp = responseBuilder.buildResponse(res, undefined, response);
let sentResp = ResponseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
OamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.getActionProfileOperationName = async function getActionProfileOperationName (req, res, next, uuid) {
let responseCode = responseCodeEnum.code.OK;
let responseCode = ResponseCode.code.OK;
await ActionProfile.getActionProfileOperationName(req.url)
.then(function (response) {
responseBuilder.buildResponse(res, responseCode, response);
ResponseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
let sentResp = responseBuilder.buildResponse(res, undefined, response);
let sentResp = ResponseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
OamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};

module.exports.putActionProfileConsequentOperationReference = async function putActionProfileConsequentOperationReference (req, res, next, body, uuid) {
let responseCode = responseCodeEnum.code.NO_CONTENT;
let responseCode = ResponseCode.code.NO_CONTENT;
await ActionProfile.putActionProfileConsequentOperationReference(body, req.url)
.then(function (response) {
responseBuilder.buildResponse(res, responseCode, response);
ResponseBuilder.buildResponse(res, responseCode, response);
})
.catch(function (response) {
let sentResp = responseBuilder.buildResponse(res, undefined, response);
let sentResp = ResponseBuilder.buildResponse(res, undefined, response);
responseCode = sentResp.code;
});
oamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
OamLogService.recordOamRequest(req.url, req.body, responseCode, req.headers.authorization, req.method);
};
Loading

0 comments on commit 55caaef

Please sign in to comment.