Skip to content

Commit

Permalink
Merge pull request #10 from aravindvnair99/fixes
Browse files Browse the repository at this point in the history
Fixes
  • Loading branch information
aravindvnair99 authored May 20, 2020
2 parents f9f25a7 + 162ab44 commit dd019b5
Show file tree
Hide file tree
Showing 197 changed files with 31 additions and 27,267 deletions.
18 changes: 18 additions & 0 deletions functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,24 @@ app.post("/onUpdateProfile", checkCookieMiddleware, (req, res) => {
console.log("Error updating user:", error);
});
});
app.get("/deleteProfile", checkCookieMiddleware, checkValidUser, (req, res) => {
admin
.auth()
.deleteUser(req.decodedClaims.uid)
.then(() => {
db.collection("users")
.doc(req.decodedClaims.uid)
.delete()
.catch((err) => {
console.log("Error getting document", err);
return res.redirect("/signOut");
});
return res.redirect("/signOut");
})
.catch((error) => {
console.log("Error deleting user:", error);
});
});
app.post("/userQuery", (req, res) => {
admin
.auth()
Expand Down
2 changes: 1 addition & 1 deletion functions/views/passwordReset.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
</div>
</div>
</div>
<%- include('components/footer') %>
<%- include('components/footerPlain') %>
</div>
</div>
<%- include('components/scripts') %>
Expand Down
13 changes: 12 additions & 1 deletion functions/views/userProfile.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
action="/onUserProfileUpdate"
>
<div class="row">
<div class="col-md-6">
<div class="col-md-3">
<div class="form-group">
<button
class="btn btn-fill btn-wd"
Expand All @@ -97,6 +97,17 @@
</button>
</div>
</div>
<div class="col-md-3">
<div class="form-group">
<button
class="btn btn-fill btn-wd"
type="button"
onclick="location.href='/deleteProfile'"
>
Delete profile
</button>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<label for="DOB"
Expand Down
6 changes: 0 additions & 6 deletions public/assets/css/bootstrap.min.css

This file was deleted.

Binary file removed public/assets/img/apple-icon.png
Binary file not shown.
Binary file removed public/assets/img/background.jpg
Binary file not shown.
Binary file removed public/assets/img/default-avatar.png
Binary file not shown.
Binary file removed public/assets/img/faces/face-0.jpg
Binary file not shown.
Binary file removed public/assets/img/faces/face-1.jpg
Binary file not shown.
Binary file removed public/assets/img/faces/face-2.jpg
Binary file not shown.
Binary file removed public/assets/img/faces/face-3.jpg
Binary file not shown.
Binary file removed public/assets/img/favicon.png
Binary file not shown.
Binary file removed public/assets/img/flags/AD.png
Binary file not shown.
Binary file removed public/assets/img/flags/AE.png
Binary file not shown.
Binary file removed public/assets/img/flags/AG.png
Binary file not shown.
Binary file removed public/assets/img/flags/AM.png
Binary file not shown.
Binary file removed public/assets/img/flags/AR.png
Binary file not shown.
Binary file removed public/assets/img/flags/AT.png
Binary file not shown.
Binary file removed public/assets/img/flags/AU.png
Binary file not shown.
Binary file removed public/assets/img/flags/BE.png
Binary file not shown.
Binary file removed public/assets/img/flags/BF.png
Binary file not shown.
Binary file removed public/assets/img/flags/BG.png
Binary file not shown.
Binary file removed public/assets/img/flags/BO.png
Binary file not shown.
Binary file removed public/assets/img/flags/BR.png
Binary file not shown.
Binary file removed public/assets/img/flags/CA.png
Binary file not shown.
Binary file removed public/assets/img/flags/CD.png
Binary file not shown.
Binary file removed public/assets/img/flags/CG.png
Binary file not shown.
Binary file removed public/assets/img/flags/CH.png
Binary file not shown.
Binary file removed public/assets/img/flags/CL.png
Binary file not shown.
Binary file removed public/assets/img/flags/CM.png
Diff not rendered.
Binary file removed public/assets/img/flags/CN.png
Diff not rendered.
Binary file removed public/assets/img/flags/CO.png
Diff not rendered.
Binary file removed public/assets/img/flags/CZ.png
Diff not rendered.
Binary file removed public/assets/img/flags/DE.png
Diff not rendered.
Binary file removed public/assets/img/flags/DJ.png
Diff not rendered.
Binary file removed public/assets/img/flags/DK.png
Diff not rendered.
Binary file removed public/assets/img/flags/DZ.png
Diff not rendered.
Binary file removed public/assets/img/flags/EE.png
Diff not rendered.
Binary file removed public/assets/img/flags/EG.png
Diff not rendered.
Binary file removed public/assets/img/flags/ES.png
Diff not rendered.
Binary file removed public/assets/img/flags/FI.png
Diff not rendered.
Binary file removed public/assets/img/flags/FR.png
Diff not rendered.
Binary file removed public/assets/img/flags/GA.png
Diff not rendered.
Binary file removed public/assets/img/flags/GB.png
Diff not rendered.
Binary file removed public/assets/img/flags/GM.png
Diff not rendered.
Binary file removed public/assets/img/flags/GT.png
Diff not rendered.
Binary file removed public/assets/img/flags/HN.png
Diff not rendered.
Binary file removed public/assets/img/flags/HT.png
Diff not rendered.
Binary file removed public/assets/img/flags/HU.png
Diff not rendered.
Binary file removed public/assets/img/flags/ID.png
Diff not rendered.
Binary file removed public/assets/img/flags/IE.png
Diff not rendered.
Binary file removed public/assets/img/flags/IL.png
Diff not rendered.
Binary file removed public/assets/img/flags/IN.png
Diff not rendered.
Binary file removed public/assets/img/flags/IQ.png
Diff not rendered.
Binary file removed public/assets/img/flags/IR.png
Diff not rendered.
Binary file removed public/assets/img/flags/IT.png
Diff not rendered.
Binary file removed public/assets/img/flags/JM.png
Diff not rendered.
Binary file removed public/assets/img/flags/JO.png
Diff not rendered.
Binary file removed public/assets/img/flags/JP.png
Diff not rendered.
Binary file removed public/assets/img/flags/KG.png
Diff not rendered.
Binary file removed public/assets/img/flags/KN.png
Diff not rendered.
Binary file removed public/assets/img/flags/KP.png
Diff not rendered.
Binary file removed public/assets/img/flags/KR.png
Diff not rendered.
Binary file removed public/assets/img/flags/KW.png
Diff not rendered.
Binary file removed public/assets/img/flags/KZ.png
Diff not rendered.
Binary file removed public/assets/img/flags/LA.png
Diff not rendered.
Binary file removed public/assets/img/flags/LB.png
Diff not rendered.
Binary file removed public/assets/img/flags/LC.png
Diff not rendered.
Binary file removed public/assets/img/flags/LS.png
Diff not rendered.
Binary file removed public/assets/img/flags/LU.png
Diff not rendered.
Binary file removed public/assets/img/flags/LV.png
Diff not rendered.
Binary file removed public/assets/img/flags/MG.png
Diff not rendered.
Binary file removed public/assets/img/flags/MK.png
Diff not rendered.
Binary file removed public/assets/img/flags/ML.png
Diff not rendered.
Binary file removed public/assets/img/flags/MM.png
Diff not rendered.
Binary file removed public/assets/img/flags/MT.png
Diff not rendered.
Binary file removed public/assets/img/flags/MX.png
Diff not rendered.
Binary file removed public/assets/img/flags/NA.png
Diff not rendered.
Binary file removed public/assets/img/flags/NE.png
Diff not rendered.
Binary file removed public/assets/img/flags/NG.png
Diff not rendered.
Binary file removed public/assets/img/flags/NI.png
Diff not rendered.
Binary file removed public/assets/img/flags/NL.png
Diff not rendered.
Binary file removed public/assets/img/flags/NO.png
Diff not rendered.
Binary file removed public/assets/img/flags/OM.png
Diff not rendered.
Binary file removed public/assets/img/flags/PA.png
Diff not rendered.
Binary file removed public/assets/img/flags/PE.png
Diff not rendered.
Binary file removed public/assets/img/flags/PG.png
Diff not rendered.
Binary file removed public/assets/img/flags/PK.png
Diff not rendered.
Binary file removed public/assets/img/flags/PL.png
Diff not rendered.
Binary file removed public/assets/img/flags/PT.png
Diff not rendered.
Binary file removed public/assets/img/flags/PY.png
Diff not rendered.
Binary file removed public/assets/img/flags/QA.png
Diff not rendered.
Binary file removed public/assets/img/flags/RO.png
Diff not rendered.
Binary file removed public/assets/img/flags/RU.png
Diff not rendered.
Binary file removed public/assets/img/flags/RW.png
Diff not rendered.
Binary file removed public/assets/img/flags/SA.png
Diff not rendered.
Binary file removed public/assets/img/flags/SE.png
Diff not rendered.
Binary file removed public/assets/img/flags/SG.png
Diff not rendered.
Binary file removed public/assets/img/flags/SL.png
Diff not rendered.
Binary file removed public/assets/img/flags/SN.png
Diff not rendered.
Binary file removed public/assets/img/flags/SO.png
Diff not rendered.
Binary file removed public/assets/img/flags/SV.png
Diff not rendered.
Binary file removed public/assets/img/flags/TD.png
Diff not rendered.
Binary file removed public/assets/img/flags/TJ.png
Diff not rendered.
Binary file removed public/assets/img/flags/TL.png
Diff not rendered.
Binary file removed public/assets/img/flags/TR.png
Diff not rendered.
Binary file removed public/assets/img/flags/TZ.png
Diff not rendered.
Binary file removed public/assets/img/flags/UA.png
Diff not rendered.
Binary file removed public/assets/img/flags/US.png
Diff not rendered.
Binary file removed public/assets/img/flags/VE.png
Diff not rendered.
Binary file removed public/assets/img/flags/VN.png
Diff not rendered.
Binary file removed public/assets/img/flags/YE.png
Diff not rendered.
Binary file removed public/assets/img/mask.png
Diff not rendered.
Binary file removed public/assets/img/new_logo.png
Diff not rendered.
Binary file removed public/assets/img/tables/agenda.png
Diff not rendered.
Binary file removed public/assets/img/tables/evernote.png
Diff not rendered.
Binary file removed public/assets/img/tables/stylus.jpg
Diff not rendered.
Binary file removed public/assets/img/tim_80x80.png
Diff not rendered.
2,655 changes: 0 additions & 2,655 deletions public/assets/js/bootstrap-datetimepicker.js

This file was deleted.

Loading

0 comments on commit dd019b5

Please sign in to comment.