Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ZavenArra committed Mar 11, 2022
1 parent 29c3888 commit c5032a3
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 253 deletions.
93 changes: 0 additions & 93 deletions __tests__/seed-example.js

This file was deleted.

94 changes: 0 additions & 94 deletions __tests__/seed-spec-example.spec.js

This file was deleted.

20 changes: 0 additions & 20 deletions __tests__/serverTest-example.js

This file was deleted.

36 changes: 0 additions & 36 deletions __tests__/supertest-example.spec.js

This file was deleted.

14 changes: 7 additions & 7 deletions database/etl/migrate.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
require('dotenv').config({ path: `../../.env.${process.env.NODE_ENV}` });
const generate_uuid_v4 = require("uuid").v4;
const log = require('loglevel');

const knex = require('../../server/database/knex');

async function migrate() {
thx = await knex.transaction();
const thx = await knex.transaction();

const entities = await thx.table('entity').select('*')
let entityIdLookup = {}
const entityIdLookup = {}
entities.forEach( (stakeholderRow) => {
entityIdLookup[stakeholderRow.id] = stakeholderRow.stakeholder_uuid;
})
Expand All @@ -16,19 +16,19 @@ async function migrate() {

const exists = await thx.table('stakeholder.stakeholder').where('id', '=', stakeholderRow.stakeholder_uuid);
if(exists.length > 0){
console.log('stakeholder already exists')
log.warn('stakeholder already exists')
return;
}


let type = 'Person';
if(stakeholderRow.type == 'o' || stakeholderRow.type == 'O'){
if(stakeholderRow.type === 'o' || stakeholderRow.type === 'O'){
type = 'Organization';
}

const stakeholder = {
id: stakeholderRow.stakeholder_uuid,
type: type,
type,
org_name: stakeholderRow.org_name,
first_name: stakeholderRow.first_name,
last_name: stakeholderRow.last_name,
Expand All @@ -51,7 +51,7 @@ async function migrate() {
await thx.table('stakeholder.stakeholder_relation').insert(relation);
}))
}))
console.log('DONE');
log.info('DONE');
thx.commit();
}

Expand Down
3 changes: 0 additions & 3 deletions server/app.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
const express = require('express');
const Sentry = require('@sentry/node');
const cors = require('cors');
const log = require('loglevel');
const HttpError = require('./utils/HttpError');
const { sentryDSN } = require('../config/config');
const { handlerWrapper, errorHandler } = require('./utils/utils');
const router = require('./routes');

Expand All @@ -14,7 +12,6 @@ if (process.env.NODE_ENV === 'development') {
app.use(cors());
}

Sentry.init({ dsn: sentryDSN });

/*
* Check request
Expand Down

0 comments on commit c5032a3

Please sign in to comment.