diff --git a/.github/workflows/firstmate.yaml b/.github/workflows/firstmate.yaml index 7864e97..d253e36 100644 --- a/.github/workflows/firstmate.yaml +++ b/.github/workflows/firstmate.yaml @@ -26,17 +26,6 @@ jobs: run: pnpm lint - name: Install packages run: pnpm test - docker: - runs-on: ubuntu-latest - name: Validate docker - steps: - - uses: actions/checkout@v3 - - name: Setup Docker buildx - uses: docker/setup-buildx-action@v1.6.0 - with: - driver: docker - - name: docker build - run: docker build . -t "test-docker" helm: runs-on: ubuntu-latest name: Validate helm diff --git a/src/routes/exampleRouter.js b/src/routes/exampleRouter.js index 3243254..c3fa7a8 100644 --- a/src/routes/exampleRouter.js +++ b/src/routes/exampleRouter.js @@ -9,4 +9,6 @@ const router = express.Router(); router.route("/:id") .get(grantAccessByPermissionMiddleware([API_PERMISSIONS.PUBLIC_ENDPOINT]), exampleController.getById) +router.route("/user-data/:id").get( exampleController.getById) + export default router; \ No newline at end of file diff --git a/src/services/exampleService.js b/src/services/exampleService.js index 165f813..8a136db 100644 --- a/src/services/exampleService.js +++ b/src/services/exampleService.js @@ -1,4 +1,5 @@ import exampleRepo from "../repos/exampleRepo.js" +import logger from "../utils/logger.js"; export class ExampleService { @@ -6,6 +7,15 @@ export class ExampleService { return await exampleRepo.getById(id) } + async getExcetutedDocuments(id) { + return await exampleRepo.getById(id) + } + + async getUserData(id) { + const user = await exampleRepo.getById(id); + logger.info(user.data); + } + } diff --git a/src/services/newService.js b/src/services/newService.js new file mode 100644 index 0000000..0ed8581 --- /dev/null +++ b/src/services/newService.js @@ -0,0 +1,18 @@ +import exampleRepo from "../repos/exampleRepo.js" +import logger from "./utils/logger.js"; + +export class NewService { + + async getById(id) { + logger.info("Getting data by ID.") + return await exampleRepo.getById(id); + } + + async getDataFromRepo(id) { + return await exampleRepo.getData(id); + } + + +} + +export default new NewService(); \ No newline at end of file