Skip to content

Commit

Permalink
fix:packages using init files, add:added gender to sample route
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamgutgutia committed Dec 24, 2023
1 parent 9399642 commit 09b126d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
3 changes: 1 addition & 2 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from flask import Flask, jsonify, request
from flask import Flask
from flask_cors import CORS
from dotenv import load_dotenv
import os
from routers import router
import traceback
load_dotenv()


Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion controllers/headers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flask import request, jsonify
from utils.createDf import createDf
from utils import createDf

def headers():

Expand Down
7 changes: 4 additions & 3 deletions controllers/vcf.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flask import request, Response, jsonify
from utils.createDf import createDf
from utils.vcfGenerator import generateVcf
from utils import createDf
from utils import generateVcf
import json
import vobject

Expand Down Expand Up @@ -71,7 +71,8 @@ def vcf():
"Last Name":vcard.n.value.family,
"Suffix":vcard.n.value.suffix,
"Phone Number(s)": "/".join([tel.value for tel in vcard.tel_list]) if hasattr(vcard, 'tel') else "",
"E-Mail": "/".join([email.value for email in vcard.email_list]) if hasattr(vcard, 'email') else ""
"E-Mail": "/".join([email.value for email in vcard.email_list]) if hasattr(vcard, 'email') else "",
"Gender":vcard.gender.value
})
return jcard, 200

Expand Down
1 change: 1 addition & 0 deletions routers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .routers import *
2 changes: 1 addition & 1 deletion routers.py → routers/routers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from flask import Blueprint
from controllers.index import *
from controllers import *
router = Blueprint('router', __name__)

router.add_url_rule('/', 'home', home,methods=["GET"])
Expand Down
2 changes: 2 additions & 0 deletions utils/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .createDf import createDf
from .vcfGenerator import generateVcard,generateVcf

0 comments on commit 09b126d

Please sign in to comment.