Skip to content

Commit

Permalink
Added fix for path
Browse files Browse the repository at this point in the history
  • Loading branch information
astherath committed Sep 20, 2024
1 parent d053abd commit 394e521
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 20 deletions.
6 changes: 3 additions & 3 deletions src/App.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import 'reflect-metadata';
import express, { Application, Request, Response, NextFunction } from 'express';
import { container } from 'tsyringe';
import { CommonConfig, CommonConfigKeys } from '@common/CommonConfig';
import { HomeController } from '@controllers/Home';
import { TestDbController } from '@controllers/TestDb';
import { CommonConfig, CommonConfigKeys } from './common/CommonConfig';
import { HomeController } from './controllers/Home';
import { TestDbController } from './controllers/TestDb';

export default class App {
public app: Application;
Expand Down
3 changes: 2 additions & 1 deletion src/controllers/Home.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import 'reflect-metadata';
import { NextFunction, Request, Response } from 'express';
import { Logger } from '../common/Logger';
import { injectable, inject } from 'tsyringe';
import { GetHomeResponse } from '@models/GetHomeResponse';
import { GetHomeResponse } from 'src/models/GetHomeResponse';

@injectable()
export class HomeController {
Expand Down
10 changes: 5 additions & 5 deletions src/controllers/TestDb.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import 'reflect-metadata';
import { NextFunction, Request, Response } from 'express';
import { Logger } from '@/common/Logger';
import { Logger } from '../common/Logger';
import { injectable, inject } from 'tsyringe';
import { DbClient } from '@services/DbClient';
import { QueryWithFilterResponse } from '@models/QueryWithFilterResponse';
import { DbClient } from '../services/DbClient';
import { QueryWithFilterResponse } from '../models/QueryWithFilterResponse';
import {
QueryWithFilterRequest,
queryWithFilterRequestSchema,
} from '@models/QueryWithFilterRequest';
import { validateAndSendIfFail } from '@/common/utils';
} from '../models/QueryWithFilterRequest';
import { validateAndSendIfFail } from '../common/utils';

@injectable()
export class TestDbController {
Expand Down
2 changes: 1 addition & 1 deletion src/models/QueryWithFilterRequest.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CommonResponse } from '@/common/CommonResponse';
import { CommonResponse } from '../common/CommonResponse';
import Joi from 'joi';
import { Filter, Document } from 'mongodb';

Expand Down
2 changes: 1 addition & 1 deletion src/models/QueryWithFilterResponse.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CommonResponse } from '@common/CommonResponse';
import { CommonResponse } from '../common/CommonResponse';
import { Document } from 'mongodb';

export interface QueryWithFilterResponse extends CommonResponse {
Expand Down
4 changes: 2 additions & 2 deletions src/services/DbClient.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import 'reflect-metadata';
import { Logger } from '@/common/Logger';
import { Logger } from '../common/Logger';
import { Db, Document, Filter, MongoClient } from 'mongodb';
import { inject, injectable } from 'tsyringe';
import { CommonConfig, CommonConfigKeys } from '@/common/CommonConfig';
import { CommonConfig, CommonConfigKeys } from '../common/CommonConfig';

// Replace the following with your Atlas connection string

Expand Down
7 changes: 0 additions & 7 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@
"node_modules/@types"
],
"lib" : ["es2017", "dom", "ESNext"],
"paths": {
"@models/*": ["./src/models/*"],
"@controllers/*": ["./src/controllers/*"],
"@/*": ["./src/*"],
"@common/*": ["./src/common/*"],
"@services/*": ["./src/services/*"]
},
"noEmitOnError": true
// "types" : ["bun-types"]
},
Expand Down

0 comments on commit 394e521

Please sign in to comment.