Skip to content

Commit 6d4986c

Browse files
authored
Merge pull request pradanvirudhunagar#47 from akshaykumar059004/main
Fix: Moved status code to basic details
2 parents 8724006 + 56109c0 commit 6d4986c

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy to EC2
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Copy files to EC2
16+
uses: appleboy/scp-action@v0.1.4
17+
with:
18+
host: ${{ secrets.EC2_HOST }}
19+
username: ${{ secrets.EC2_USER }}
20+
key: ${{ secrets.EC2_SSH_KEY }}
21+
source: "."
22+
target: "~/pradan_forms_processing_system_backend"
23+
24+
- name: SSH into EC2 and restart app
25+
uses: appleboy/ssh-action@v0.1.10
26+
with:
27+
host: ${{ secrets.EC2_HOST }}
28+
username: ${{ secrets.EC2_USER }}
29+
key: ${{ secrets.EC2_SSH_KEY }}
30+
script: |
31+
cd ~/pradan_forms_processing_system_backend
32+
npm install --production
33+
pm2 restart myapp || pm2 start index.js --name "Pradan-app-backend"
34+
pm2 save

controllers/previewformsData.controller.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ const getbasicdetails_sql = `SELECT
4747
forms.age,
4848
forms.mobile,
4949
forms.district,
50+
forms.status,
5051
forms.block,
5152
forms.panchayat,
5253
forms.hamlet,
@@ -184,8 +185,8 @@ const getbasicdetails_sql = `SELECT
184185
exports.getpreviewspecificformData = asyncHandler( async (req, res) => {
185186
const id = req.query.form_id;
186187
const form_type = req.query.form_type;
187-
//console.log("Form ID",id);
188-
//console.log("Form type",typeof(form_type));
188+
// console.log("Form ID",id);
189+
// console.log("Form type",typeof(form_type));
189190
const connection = await db.getConnection();
190191

191192
try {

0 commit comments

Comments
 (0)