Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
d13b876
added console logs and stubbing files out
al-rosenthal Sep 30, 2022
f28c95c
Merge branch 'dev' into BHBC-1963
al-rosenthal Sep 30, 2022
b4c51dc
improved error codes
anissa-agahchen Sep 30, 2022
03df104
stubbed out occurrence service and repo
al-rosenthal Sep 30, 2022
083b524
S3 and file prep
al-rosenthal Oct 3, 2022
8c571c7
new functions to validation service, validation repo stubbed out
al-rosenthal Oct 3, 2022
6e3aba6
small POC of what the error handling could look like
anissa-agahchen Oct 3, 2022
b5dcbd1
submission service repo added
al-rosenthal Oct 3, 2022
9359309
finished stubing out functions
al-rosenthal Oct 4, 2022
40a9321
getting working started
al-rosenthal Oct 4, 2022
4d9f41a
further in process
al-rosenthal Oct 4, 2022
2a640af
happy path working
al-rosenthal Oct 4, 2022
d71cd91
more clean up, moved more code around
al-rosenthal Oct 5, 2022
1ec867e
clean up
al-rosenthal Oct 5, 2022
b33f74d
converted all error codes from hard-coded to coming from the submissi…
anissa-agahchen Oct 5, 2022
4d67960
updated transform, validate and process endpoints
al-rosenthal Oct 5, 2022
7a68e99
fixed view occurrence endpoint
al-rosenthal Oct 5, 2022
3cf404b
scrape occurrences is wired up with new service
al-rosenthal Oct 5, 2022
25ca83a
database migration to add more submission status and message types
anissa-agahchen Oct 5, 2022
63696e7
fix broken tests
anissa-agahchen Oct 5, 2022
ef8fc47
tweak
anissa-agahchen Oct 5, 2022
0047f9c
updated dwc validation endpoint
al-rosenthal Oct 5, 2022
b74d827
ran format and ling fix
al-rosenthal Oct 5, 2022
e091568
clenaed up endpoints for better connection handling
al-rosenthal Oct 6, 2022
2c0ebae
fixed dwc parsing
al-rosenthal Oct 6, 2022
5ee52d0
added comments to new service
al-rosenthal Oct 6, 2022
8df6607
started writing tests
al-rosenthal Oct 6, 2022
772f6e1
occurrence repo tests added
al-rosenthal Oct 6, 2022
87f87a2
ran lint and format fix
al-rosenthal Oct 6, 2022
a6bc8c0
added validation repo test
al-rosenthal Oct 6, 2022
adba47b
submission repo tests added
al-rosenthal Oct 6, 2022
99bda48
Merge branch 'BHBC-1963' into BHBC-1962
al-rosenthal Oct 6, 2022
bb4ed93
fixed import errors
al-rosenthal Oct 6, 2022
4b9cc95
stubbed out try catch on process
al-rosenthal Oct 11, 2022
2f90ec9
updated message types and submission types
anissa-agahchen Oct 11, 2022
d097788
updated exception throws
al-rosenthal Oct 11, 2022
d6bb2b8
conflict resolved
al-rosenthal Oct 11, 2022
44cb0a0
fixed errors
al-rosenthal Oct 11, 2022
1f16c7e
clean up errors
al-rosenthal Oct 11, 2022
a738382
tempalte scrape and upload wrapped in trycatch
al-rosenthal Oct 11, 2022
35f7b01
added more trycatches for process steps
al-rosenthal Oct 11, 2022
e77ed9c
added throws to s3 functions
al-rosenthal Oct 11, 2022
18a5d9c
fixing resent header issue
al-rosenthal Oct 11, 2022
1e735ab
wrapping prep work into function
al-rosenthal Oct 11, 2022
06f7df2
stubbing out error class
al-rosenthal Oct 11, 2022
604d3da
added new message objects to throw instead
al-rosenthal Oct 12, 2022
8c178df
updating validation results fucntion
al-rosenthal Oct 12, 2022
1854127
updated migrations and message throws for prep
al-rosenthal Oct 12, 2022
9127a30
updated migrations with new errors
al-rosenthal Oct 12, 2022
b71ee8f
updating enum
al-rosenthal Oct 12, 2022
fd6ed8e
replaced enum
al-rosenthal Oct 12, 2022
ee185cf
clean up
al-rosenthal Oct 12, 2022
6e8b4f3
all new errors added
al-rosenthal Oct 12, 2022
84f6254
fixing parent try catches
al-rosenthal Oct 12, 2022
7026a44
got the rejected status displaying
anissa-agahchen Oct 12, 2022
8922717
merge conflicts
anissa-agahchen Oct 12, 2022
ca88886
test setup
al-rosenthal Oct 12, 2022
4ba5528
updated endpoints with new error catching
al-rosenthal Oct 12, 2022
2fead93
all message types are accounted for in app
anissa-agahchen Oct 12, 2022
2ba18e9
front-end changes
anissa-agahchen Oct 12, 2022
138f46c
fixing up dwc endpoint
al-rosenthal Oct 12, 2022
8ae9d7a
pulled changes
al-rosenthal Oct 12, 2022
38af83b
submission status working
al-rosenthal Oct 12, 2022
9511ef2
ran lint fix
al-rosenthal Oct 12, 2022
693592f
updated more throws
al-rosenthal Oct 12, 2022
53ddc24
fixed content validation error
al-rosenthal Oct 13, 2022
7c40d49
fix front-end issue
anissa-agahchen Oct 13, 2022
2228046
fixed bug
anissa-agahchen Oct 13, 2022
0b1ef16
updated logic for transform state and verbage
al-rosenthal Oct 13, 2022
a8135ce
making tests compile
anissa-agahchen Oct 13, 2022
0448458
merge with dev
anissa-agahchen Oct 13, 2022
b576e4c
text change
anissa-agahchen Oct 13, 2022
0a53398
skip broken tests
anissa-agahchen Oct 13, 2022
ce73abf
tested parse XLSX
al-rosenthal Oct 13, 2022
5266216
more tests
al-rosenthal Oct 14, 2022
27ae885
testing template validation
al-rosenthal Oct 14, 2022
a5a86e2
update to user errors
anissa-agahchen Oct 14, 2022
7f1e2e4
improvements to use error
anissa-agahchen Oct 14, 2022
0d802f8
pulled changes
al-rosenthal Oct 14, 2022
9c233a3
fixed spelling mistakes
al-rosenthal Oct 14, 2022
2d161e4
validated persisted validation results
al-rosenthal Oct 14, 2022
9ac0c3c
fixing format, fixed spelling mistakes
al-rosenthal Oct 14, 2022
3218d64
get schema tested
al-rosenthal Oct 14, 2022
7b5e811
transformation schema tested
al-rosenthal Oct 14, 2022
91ce7d8
44% covered
al-rosenthal Oct 14, 2022
7777e07
prep dwc archive tested
al-rosenthal Oct 14, 2022
bd21df6
dwc/validate tests
anissa-agahchen Oct 14, 2022
a173872
merge conflicts
anissa-agahchen Oct 14, 2022
b6841bf
persist transformation tested
al-rosenthal Oct 14, 2022
35496c3
xlsx/validate
anissa-agahchen Oct 14, 2022
778c7e0
xlsx/process and xlsx/trasnform
anissa-agahchen Oct 15, 2022
5b1b922
merged changes
al-rosenthal Oct 15, 2022
b1845d6
more
al-rosenthal Oct 15, 2022
eaf32d7
65% coverage
al-rosenthal Oct 17, 2022
813303c
error-service tests
anissa-agahchen Oct 17, 2022
0ad22fe
validate file tested
al-rosenthal Oct 17, 2022
c08a7df
Merge branch 'BHBC-1962' of https://github.com/bcgov/biohubbc into BH…
al-rosenthal Oct 17, 2022
32395a5
finish coverage for repo files
KjartanE Oct 17, 2022
bfac311
Merge branch 'BHBC-1962' of https://github.com/bcgov/biohubbc into BH…
KjartanE Oct 17, 2022
512fbdc
pulled changes, added dwc process test
al-rosenthal Oct 17, 2022
5a499ec
process file tested
al-rosenthal Oct 17, 2022
5c30507
validate dwc tested
al-rosenthal Oct 17, 2022
2759fca
last function tested
al-rosenthal Oct 17, 2022
2ea15e0
s3key for biohub
anissa-agahchen Oct 17, 2022
f9bfd8a
merge conflicts
anissa-agahchen Oct 17, 2022
f819a94
removed some code smells
al-rosenthal Oct 17, 2022
b1ef792
Merge branch 'BHBC-1962' of https://github.com/bcgov/biohubbc into BH…
al-rosenthal Oct 17, 2022
cc41f76
fixed tests
anissa-agahchen Oct 17, 2022
ab6ba64
merge conflicts
anissa-agahchen Oct 17, 2022
aa31fa8
fixed more code smells
al-rosenthal Oct 17, 2022
db64126
remove coments
anissa-agahchen Oct 17, 2022
a8f8484
fixed various code smells
al-rosenthal Oct 17, 2022
29cc0de
fixed the last code smell
al-rosenthal Oct 17, 2022
8102a3d
ran lint fix
al-rosenthal Oct 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
small POC of what the error handling could look like
  • Loading branch information
anissa-agahchen committed Oct 3, 2022
commit 6e3aba6b0dcf0b896d5f470cfd3b243a1820c807
2 changes: 1 addition & 1 deletion api/src/errors/api-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class ApiExecuteSQLError extends ApiError {
* @class ApiBuildSQLError
* @extends {ApiError}
*/
export class ApiBuildSQLError extends ApiError {
export class ApiBuildSQLError extends ApiError {
constructor(message: string, errors?: (string | object)[]) {
super(ApiErrorType.BUILD_SQL, message, errors);
}
Expand Down
1 change: 0 additions & 1 deletion api/src/paths/codes.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import * as db from '../database/db';
import { HTTPError } from '../errors/http-error';

import { CodeService } from '../services/code-service';
import { getMockDBConnection } from '../__mocks__/db';
import * as codes from './codes';
Expand Down
1 change: 0 additions & 1 deletion api/src/paths/codes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { RequestHandler } from 'express';
import { Operation } from 'express-openapi';
import { getAPIUserDBConnection } from '../database/db';
import { HTTP500 } from '../errors/http-error';

import { CodeService } from '../services/code-service';
import { getLogger } from '../utils/logger';

Expand Down
1 change: 0 additions & 1 deletion api/src/paths/draft/{draftId}/get.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import sinonChai from 'sinon-chai';
import SQL from 'sql-template-strings';
import * as db from '../../../database/db';
import { HTTPError } from '../../../errors/http-error';

import draft_queries from '../../../queries/project/draft';
import { getMockDBConnection } from '../../../__mocks__/db';
import * as viewDraftProject from './get';
Expand Down
1 change: 0 additions & 1 deletion api/src/paths/drafts.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import sinonChai from 'sinon-chai';
import SQL from 'sql-template-strings';
import * as db from '../database/db';
import { HTTPError } from '../errors/http-error';

import draft_queries from '../queries/project/draft';
import { getMockDBConnection } from '../__mocks__/db';
import * as drafts from './drafts';
Expand Down
1 change: 0 additions & 1 deletion api/src/paths/drafts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { RequestHandler } from 'express';
import { Operation } from 'express-openapi';
import { getDBConnection } from '../database/db';
import { HTTP400 } from '../errors/http-error';

import { draftResponseObject } from '../openapi/schemas/draft';
import { queries } from '../queries/queries';
import { authorizeRequestHandler } from '../request-handlers/security/authorization';
Expand Down
1 change: 0 additions & 1 deletion api/src/paths/dwc/eml.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import sinon from 'sinon';
import sinonChai from 'sinon-chai';
import * as db from '../../database/db';
import { HTTPError } from '../../errors/http-error';

import { EmlService } from '../../services/eml-service';
import { getMockDBConnection, getRequestHandlerMocks } from '../../__mocks__/db';
import { getProjectEml } from './eml';
Expand Down
22 changes: 21 additions & 1 deletion api/src/paths/dwc/validate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import { PROJECT_ROLE } from '../../constants/roles';
import { getDBConnection, IDBConnection } from '../../database/db';
import { HTTP400, HTTP500 } from '../../errors/http-error';
import { queries } from '../../queries/queries';
import { SUBMISSION_MESSAGE_TYPE, SUBMISSION_STATUS_TYPE } from '../../repositories/error-repository';
import { authorizeRequestHandler } from '../../request-handlers/security/authorization';
import { ErrorService } from '../../services/error-service';
import { getFileFromS3 } from '../../utils/file-utils';
import { getLogger } from '../../utils/logger';
import { ICsvState, IHeaderError, IRowError } from '../../utils/media/csv/csv-file';
Expand Down Expand Up @@ -108,6 +110,15 @@ export const getValidateAPIDoc = (basicDescription: string, successDescription:
};
};

//NOTES:
// Do we want a validation service, or an error service?
// Currently, a failed validation is a submission status state
// option 1: we keep it the way it is, and tailor the error message ... ie SQL, or other custom message
// option 2: create a validation service, to group all validation related functions ... some reuse between dwc and xlsx validation
// option 3: create an error-service, to manage all kinds of errors ... submission as a starting point
// or some combination.
// Both option 2 and 3 could help introduce more granular error messages and message types

POST.apiDoc = {
...getValidateAPIDoc(
'Validates a Darwin Core (DWC) Archive survey observation submission.',
Expand Down Expand Up @@ -148,8 +159,17 @@ export function getOccurrenceSubmission(): RequestHandler {
req['occurrence_submission'] = response.rows[0];

next();
} catch (error) {
} catch (error: any) {
defaultLog.error({ label: 'getOccurrenceSubmission', message: 'error', error });

const errorService = new ErrorService(connection);

await errorService.insertSubmissionStatusAndMessage(
req['occurrence_submission'].occurrence_submission_id,
SUBMISSION_STATUS_TYPE.FAILED_VALIDATION,
SUBMISSION_MESSAGE_TYPE.ERROR,
error.message
);
throw error;
} finally {
connection.release();
Expand Down
1 change: 0 additions & 1 deletion api/src/paths/logger.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { expect } from 'chai';
import { describe } from 'mocha';
import { HTTPError } from '../errors/http-error';

import * as logger from './logger';

describe('logger', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { ATTACHMENT_TYPE } from '../../../../../constants/attachments';
import { PROJECT_ROLE } from '../../../../../constants/roles';
import { getDBConnection, IDBConnection } from '../../../../../database/db';
import { HTTP400 } from '../../../../../errors/http-error';

import { queries } from '../../../../../queries/queries';
import { authorizeRequestHandler } from '../../../../../request-handlers/security/authorization';
import { deleteFileFromS3 } from '../../../../../utils/file-utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import sinonChai from 'sinon-chai';
import SQL from 'sql-template-strings';
import * as db from '../../../../../../../../database/db';
import { HTTPError } from '../../../../../../../../errors/http-error';

import survey_queries from '../../../../../../../../queries/survey';
import * as file_utils from '../../../../../../../../utils/file-utils';
import { MediaFile } from '../../../../../../../../utils/media/media-file';
Expand Down
1 change: 0 additions & 1 deletion api/src/paths/search.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import SQL from 'sql-template-strings';
import { SYSTEM_ROLE } from '../constants/roles';
import * as db from '../database/db';
import { HTTPError } from '../errors/http-error';

import search_queries from '../queries/search';
import * as authorization from '../request-handlers/security/authorization';
import { getMockDBConnection } from '../__mocks__/db';
Expand Down
147 changes: 147 additions & 0 deletions api/src/repositories/error-repository.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
import SQL from 'sql-template-strings';
import { ApiExecuteSQLError } from '../errors/api-error';
import { BaseRepository } from './base-repository';

export enum SUBMISSION_STATUS_TYPE {
'PUBLISHED' = 'Published',
'REJECTED' = 'Rejected',
'SYSTEM_ERROR' = 'System Error',
//Success
'OUT_DATED_RECORD' = 'Out Dated Record',
'INGESTED' = 'Ingested',
'UPLOADED' = 'Uploaded',
'VALIDATED' = 'Validated',
'SECURED' = 'Secured',
'EML_INGESTED' = 'EML Ingested',
'EML_TO_JSON' = 'EML To JSON',
'METADATA_TO_ES' = 'Metadata To ES',
'NORMALIZED' = 'Normalized',
'SPATIAL_TRANSFORM_UNSECURE' = 'Spatial Transform Unsecure',
'SPATIAL_TRANSFORM_SECURE' = 'Spatial Transform Secure',
//Failure
'FAILED_INGESTION' = 'Failed Ingestion',
'FAILED_UPLOAD' = 'Failed Upload',
'FAILED_VALIDATION' = 'Failed Validation',
'FAILED_SECURITY' = 'Failed Security',
'FAILED_EML_INGESTION' = 'Failed EML Ingestion',
'FAILED_EML_TO_JSON' = 'Failed EML To JSON',
'FAILED_METADATA_TO_ES' = 'Failed Metadata To ES',
'FAILED_NORMALIZATION' = 'Failed Normalization',
'FAILED_SPATIAL_TRANSFORM_UNSECURE' = 'Failed Spatial Transform Unsecure',
'FAILED_SPATIAL_TRANSFORM_SECURE' = 'Failed Spatial Transform Secure'
}

export enum SUBMISSION_MESSAGE_TYPE {
'NOTICE' = 'Notice',
'ERROR' = 'Error',
'WARNING' = 'Warning',
'DEBUG' = 'Debug'
}

/**
* A repository class for accessing permit data.
*
* @export
* @class PermitRepository
* @extends {BaseRepository}
*/
export class ErrorRepository extends BaseRepository {
/**
* Insert a new submission status record.
*
* @param {number} submissionId
* @param {SUBMISSION_STATUS_TYPE} submissionStatusType
* @return {*} {Promise<{ submission_status_id: number; submission_status_type_id: number }>}
* @memberof SubmissionRepository
*/
async insertSubmissionStatus(
submissionId: number,
submissionStatusType: SUBMISSION_STATUS_TYPE
): Promise<{ submission_status_id: number; submission_status_type_id: number }> {
const sqlStatement = SQL`
INSERT INTO submission_status (
submission_id,
submission_status_type_id,
event_timestamp
) VALUES (
${submissionId},
(
SELECT
submission_status_type_id
FROM
submission_status_type
WHERE
name = ${submissionStatusType}
),
now()
)
RETURNING
submission_status_id,
submission_status_type_id;
`;

const response = await this.connection.sql<{ submission_status_id: number; submission_status_type_id: number }>(
sqlStatement
);

if (response.rowCount !== 1) {
throw new ApiExecuteSQLError('Failed to insert submission status record', [
'SubmissionRepository->insertSubmissionStatus',
'rowCount was null or undefined, expected rowCount = 1'
]);
}

return response.rows[0];
}

/**
* Insert a submission message record.
*
* @param {number} submissionStatusId
* @param {SUBMISSION_MESSAGE_TYPE} submissionMessageType
* @return {*} {Promise<{ submission_message_id: number; submission_message_type_id: number }>}
* @memberof SubmissionRepository
*/
async insertSubmissionMessage(
submissionStatusId: number,
submissionMessageType: SUBMISSION_MESSAGE_TYPE,
submissionMessage: string
): Promise<{ submission_message_id: number; submission_message_type_id: number }> {
const sqlStatement = SQL`
INSERT INTO submission_message (
submission_status_id,
submission_message_type_id,
event_timestamp,
message
) VALUES (
${submissionStatusId},
(
SELECT
submission_message_type_id
FROM
submission_message_type
WHERE
name = ${submissionMessageType}
),
now(),
${submissionMessage}
)
RETURNING
submission_message_id,
submission_message_type_id;
`;

const response = await this.connection.sql<{ submission_message_id: number; submission_message_type_id: number }>(
sqlStatement
);

if (response.rowCount !== 1) {
throw new ApiExecuteSQLError('Failed to insert submission message record', [
'SubmissionRepository->insertSubmissionMessage',
'rowCount was null or undefined, expected rowCount = 1'
]);
}

return response.rows[0];
}
}
2 changes: 1 addition & 1 deletion api/src/services/code-service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { coordinator_agency, region, regional_offices } from '../constants/codes';
import { queries } from '../queries/queries';
import { getLogger } from '../utils/logger';
import { DBService } from './service';
import { DBService } from './db-service';

const defaultLog = getLogger('queries/code-queries');

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion api/src/services/eml-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import {
} from '../models/survey-view';
import { getDbCharacterSystemMetaDataConstantSQL } from '../queries/codes/db-constant-queries';
import { CodeService, IAllCodeSets } from './code-service';
import { DBService } from './db-service';
import { ProjectService } from './project-service';
import { DBService } from './service';
import { SurveyService } from './survey-service';
import { TaxonomyService } from './taxonomy-service';

Expand Down
69 changes: 69 additions & 0 deletions api/src/services/error-service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
import { IDBConnection } from '../database/db';
import { ErrorRepository, SUBMISSION_MESSAGE_TYPE, SUBMISSION_STATUS_TYPE } from '../repositories/error-repository';
import { DBService } from './db-service';

export class ErrorService extends DBService {
errorRepository: ErrorRepository;

constructor(connection: IDBConnection) {
super(connection);

this.errorRepository = new ErrorRepository(connection);
}

/**
* Inserts both the status and message of a submission
*
* @param {number} submissionId
* @param {SUBMISSION_STATUS_TYPE} submissionStatusType
* @param {SUBMISSION_MESSAGE_TYPE} submissionMessageType
* @param {string} submissionMessage
* @return {*} {Promise<{
* submission_status_id: number;
* submission_message_id: number;
* }>}
* @memberof SubmissionService
*/
async insertSubmissionStatusAndMessage(
submissionId: number,
submissionStatusType: SUBMISSION_STATUS_TYPE,
submissionMessageType: SUBMISSION_MESSAGE_TYPE,
submissionMessage: string
): Promise<{
submission_status_id: number;
submission_message_id: number;
}> {
const submission_status_id = (await this.errorRepository.insertSubmissionStatus(submissionId, submissionStatusType))
.submission_status_id;

const submission_message_id = (
await this.errorRepository.insertSubmissionMessage(submission_status_id, submissionMessageType, submissionMessage)
).submission_message_id;

return {
submission_status_id,
submission_message_id
};
}

/**
* Insert a submission status record.
*
* @param {number} submissionId
* @param {SUBMISSION_STATUS_TYPE} submissionStatusType
* @return {*} {Promise<{
* submission_status_id: number;
* submission_status_type_id: number;
* }>}
* @memberof SubmissionService
*/
async insertSubmissionStatus(
submissionId: number,
submissionStatusType: SUBMISSION_STATUS_TYPE
): Promise<{
submission_status_id: number;
submission_status_type_id: number;
}> {
return this.errorRepository.insertSubmissionStatus(submissionId, submissionStatusType);
}
}
2 changes: 1 addition & 1 deletion api/src/services/permit-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SYSTEM_ROLE } from '../constants/roles';
import { IDBConnection } from '../database/db';
import { ApiGeneralError } from '../errors/api-error';
import { IPermitModel, PermitRepository } from '../repositories/permit-repository';
import { DBService } from './service';
import { DBService } from './db-service';
import { UserService } from './user-service';
export class PermitService extends DBService {
permitRepository: PermitRepository;
Expand Down
2 changes: 1 addition & 1 deletion api/src/services/platform-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import FormData from 'form-data';
import { URL } from 'url';
import { HTTP400 } from '../errors/http-error';
import { getFileFromS3 } from '../utils/file-utils';
import { DBService } from './db-service';
import { EmlService } from './eml-service';
import { KeycloakService } from './keycloak-service';
import { DBService } from './service';
import { SurveyService } from './survey-service';

export interface IDwCADataset {
Expand Down
2 changes: 1 addition & 1 deletion api/src/services/project-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { getSurveyAttachmentS3Keys } from '../paths/project/{projectId}/survey/{
import { GET_ENTITIES, IUpdateProject } from '../paths/project/{projectId}/update';
import { queries } from '../queries/queries';
import { deleteFileFromS3 } from '../utils/file-utils';
import { DBService } from './service';
import { DBService } from './db-service';

export class ProjectService extends DBService {
/**
Expand Down
Loading