Skip to content
This repository was archived by the owner on Apr 9, 2022. It is now read-only.

Deployment #212

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions backend/api/views/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ def register_user():

local_r = (
requests.post(
"http://localhost:5000/portfolio_managers",
data={"email": email, "name": "Daniel"},
"https://blooming-spire-15234.herokuapp.com/portfolio_managers",
data={"email": email, "name": email},
headers=headers,
)
).json()
Expand Down Expand Up @@ -253,7 +253,7 @@ def create_fp():

local_r = (
requests.post(
"http://localhost:5000/field_partners",
"https://blooming-spire-15234.herokuapp.com/field_partners",
data={
"email": email,
"pm_id": pm_id,
Expand All @@ -270,7 +270,7 @@ def create_fp():
)
another_r = (
requests.post(
"http://localhost:5000/messagesToFP",
"https://blooming-spire-15234.herokuapp.com/messagesToFP",
data={"email": email, "pm_id": pm_id, "password": password},
)
).json()
Expand Down
2 changes: 1 addition & 1 deletion backend/api/views/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def messageToFP():
body=password,
html="""<p>Hi, You have been added as a Field Partner! Your temporary password is """
+ str(password)
+ """. Click <a href="http://localhost:3000/temporary">here</a> to login with your temporary password and reset your password</p>""",
+ """. Click <a href="https://vast-cove-61975.herokuapp.com/temporary">here</a> to login with your temporary password and reset your password</p>""",
)

mail.send(email)
Expand Down
1 change: 0 additions & 1 deletion backend/api/views/pm.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def new_pm():
headers = {"Content-type": "application/x-www-form-urlencoded", "token": token}

message, info = verify_token(token)

if message != None:
return create_response(status=400, message=message)

Expand Down
82 changes: 60 additions & 22 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion frontend/src/components/DocumentListItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export class DocumentListItem extends Component {
'image/png',
'text/plain'
]
console.log(files[0].type)

if (!docTypes.includes(files[0].type)) {
window.alert('Document type not acceptable')
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/auth/LogIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class LogIn extends Component {
}

let token = result.response.data.result.token

if (!token) {
this.setState({
wrongInfo: !this.state.wrongInfo,
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/auth/Register.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ class Register extends Component {
}

let token = result.response.data.result.token

if (!token) {
this.setState({
errorMessage: result.response.message,
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/utils/ApiConfig.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//const hostname = window && window.location && window.location.hostname
let backend_url

backend_url = 'http://localhost:5000'
backend_url = 'https://blooming-spire-15234.herokuapp.com'

export default backend_url
2 changes: 1 addition & 1 deletion frontend/src/utils/sendMail.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export async function sendChangePasswordEmail(email, password, pm) {
password +
'.',
html:
'<p>Click <a href="http://localhost:3000/temporary">here</a> to login with your temporary password and reset your password</p>'
'<p>Click <a href="https://vast-cove-61975.herokuapp.com/temporary">here</a> to login with your temporary password and reset your password</p>'
}
await sendMail(mail_body)
}
Binary file added kiva-auth-server/.env.swp
Binary file not shown.