Skip to content

Commit

Permalink
Rework of file naming and enpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
aalonsolopez committed Dec 10, 2024
1 parent c79e461 commit 3226ebf
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const express = require('express');

const pregnancyRoutes = require('./routes/pregnancy');
const codesRoutes = require('./routes/codes');



Expand All @@ -15,7 +15,7 @@ app.use(express.urlencoded({



app.use('/snomed/pregnancy',pregnancyRoutes);
app.use('/codes',codesRoutes);


app.get('/', (req, res) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const csv = require('csvtojson');
async function getAll(req,res) {
let pregnancyList;

let csvPregFile = await fetch("https://raw.githubusercontent.com/Gravitate-Health/terminology-service/main/controllers/db/pregnancy.csv")
let csvPregFile = await fetch("https://raw.githubusercontent.com/Gravitate-Health/terminology-service/main/controllers/db/codes.csv")
.then(response => response.text())
.then(text => text);

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion kubernetes/base/001_terminology-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
spec:
containers:
- name: terminology-service
image: gravitate-registry.cr.de-fra.ionos.com/terminology-service:v0.4.0
image: gravitate-registry.cr.de-fra.ionos.com/terminology-service:v0.5.0
imagePullPolicy: Always
ports:
- containerPort: 3000
2 changes: 1 addition & 1 deletion kubernetes/dev/001_terminology-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: terminology-svc
name: terminology-service
spec:
replicas: 1
selector:
Expand Down
8 changes: 8 additions & 0 deletions routes/codes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { Router } = require('express');
const codesController = require('../controllers/codes-controller');

const router = Router();

router.get('/all',codesController.getAll ); //get every problem-

module.exports = router;
8 changes: 0 additions & 8 deletions routes/pregnancy.js

This file was deleted.

0 comments on commit 3226ebf

Please sign in to comment.