pis #12

Merged
fred.boniface merged 95 commits from pis into main 2023-05-06 21:54:51 +01:00

95 Commits

Author SHA1 Message Date
49d35355f5 Bug Fixes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-05 01:06:56 +01:00
7c76d2aa5f Lint fixes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-05 01:01:09 +01:00
e72e05ebc0 Adjust syntax to remove lint error
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-05 00:48:25 +01:00
4efd29b488 Adjust syntax to remove lint error
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-05 00:47:53 +01:00
d8add348f2 Fix
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-05 00:46:19 +01:00
fe35b0c7c3 Bump version to 2.0.0
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-04 10:13:47 +01:00
bbe39512ce Add text-align tag to table
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-02 23:02:10 +01:00
d9ef62e590 Bring email colours more on-brand
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-02 22:54:49 +01:00
c2d4e64230 Remove remaining inline style from mail tpl
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-02 22:53:39 +01:00
f40cb103f8 Add CSS Inlining to minify.utils
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-02 22:49:51 +01:00
c06c7a29ce Add Juice
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-02 22:37:06 +01:00
c9b307b697 eslint fixes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-01 21:52:31 +01:00
57fe392e8c Add notes and some linting changes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-05-01 21:44:42 +01:00
c1dac46a80 Adjust dockerignore
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-30 22:15:03 +01:00
9e9245957d Add prettier
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-30 22:13:47 +01:00
7580ff8175 ESLint fixes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-30 22:07:36 +01:00
c0c50d0e5b eslint fixes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-30 22:01:45 +01:00
080a235c2b Add eslint
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-30 22:00:13 +01:00
c22b6bf4eb Add authentication to PIS route
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-30 18:21:42 +01:00
04ffaafdd9 NPM Changes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:18:41 +01:00
3017981090 Adjust pis query to check last element
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:12:22 +01:00
1c944e9ae1 Remove dependency: string-sanitizer-fix & npm update
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:12:09 +01:00
49bb0627e9 Test new PIS Query
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:09:12 +01:00
6ca8de8c75 Again, adjust PIS query
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:09:12 +01:00
43dba62434 Remove comments
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:09:12 +01:00
201f1d0642 Adjust sanitizer functions, tidy mongo queries.
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:09:12 +01:00
b66254213e Adjust PIS query
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:08:30 +01:00
0596bd48e6 Add basic sanitizing step to PIS API
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:08:30 +01:00
417a88adb3 Lower case the API input
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:08:30 +01:00
121528c413 implement /pis endpoint
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:08:30 +01:00
5da7a951e3 Add search query for findPisByOrigDest
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:06:51 +01:00
0d207050b2 Add notes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:06:51 +01:00
038670acf2 Add pis.services
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:06:51 +01:00
f5c740bac5 Add notes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-28 13:06:51 +01:00
2e6cd7d5c3 Add notes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-21 19:55:24 +01:00
535d492443 Add minifyCSS option to html-minifier
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-19 20:51:57 +01:00
bac2613120 Add linebreak before text link
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-19 20:47:01 +01:00
e5495736fc Remove inline style from email template
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-19 20:45:54 +01:00
2606f89e95 Prepare to move minification into separate module
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-18 21:47:27 +01:00
6bc25dc154 Comments
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-18 21:21:09 +01:00
ca690c7a7e Add html-minifier for outgoing email
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-18 20:56:05 +01:00
4f4d84474c Run NPM Update
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-18 20:39:07 +01:00
ebd4d1e7a8 Add functions for staff API Call if I can get the API KEY!
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-12 13:54:06 +01:00
f1c616e9e0 Add resources for the ldbs endpoint
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-12 13:09:33 +01:00
6c754255f6 Add errorCodes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-10 20:32:59 +01:00
155a3c588c Add error codes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-10 20:19:37 +01:00
9115211b87 Add API StatusCodes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-10 20:12:25 +01:00
725d12ddac Notes 2023-04-07 22:34:10 +01:00
654855ed2e Debugging
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-07 21:22:20 +01:00
3288ddf206 Adjust middlewares 2023-04-07 18:06:47 +01:00
5af6122646 Add requireJson middleware 2023-04-07 17:53:49 +01:00
b45aacc25a Add additional domains
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-07 17:38:23 +01:00
979048105e Fix authentication functions
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-07 17:00:15 +01:00
e96f72a2fa Debugging
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-07 15:48:47 +01:00
a213014a0b It is a silly idea leaving a 404 to mean successful
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-07 14:39:45 +01:00
9c45ecfdf1 Add proxy set:
- Add app.set('trust proxy', 3)
- Add route /api/v1/ip when in development mode

Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-06 22:15:57 +01:00
096ce154da Add rate limiting and tidy up various code.
Will need complete review long before merging to main.

Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-06 22:01:37 +01:00
3f7defcf8e Making code look prettier
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-06 20:43:27 +01:00
04d7e17965 Req/Reg functions work when testing. To test with frontend
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-06 20:40:51 +01:00
90348f48f3 Debugging req/reg functions
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-06 20:36:25 +01:00
9cba7e7399 Debug request/register flows
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-06 20:17:30 +01:00
833be34333 More work on reg services
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-06 19:42:47 +01:00
214658443d Adjust valid domains list 2023-04-05 21:40:15 +01:00
1cc7e19681 Ensure domain is stored alongside reg request 2023-04-05 21:39:28 +01:00
379b35b6f7 Update mail template 2023-04-05 21:36:33 +01:00
38cf679da7 Transform the register.request function stack
It now works in dev environment pending testing
2023-04-05 20:53:07 +01:00
8fdac022d7 Add notes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 14:13:47 +01:00
853d3bfec8 Add auth test route (Only in app.js)
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 14:13:13 +01:00
f9a6a46799 Remove redundant comments
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 14:05:46 +01:00
c8e19414d1 Fix registration functions
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 14:05:04 +01:00
c4b1816c30 Adjust registration email template
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 13:59:35 +01:00
9e52faa1bb Adjust mail.send function
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 12:40:58 +01:00
f512f7db3f Refactoring mail code
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 11:27:01 +01:00
7d0b9f9d44 Add comments
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 01:09:50 +01:00
dd96e95ce5 Add better error codes
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 01:08:14 +01:00
1064db3d2f Add authentication middleware
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-05 00:58:48 +01:00
b69e34e2b5 More comments
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 22:22:05 +01:00
e982e3ad10 Remove fjla.uk from valid domains
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 22:20:59 +01:00
fd454029dc Fix module.exports order
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 22:20:09 +01:00
bea1b68a9d npm update
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 22:19:45 +01:00
f5d46a38d7 Added comments for further development
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 22:15:51 +01:00
330e8e02a0 Add request and register functions
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 22:12:38 +01:00
14e0a93d86 Add initial registration functions
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 21:28:46 +01:00
25640c2e78 Bump major versions due to dbmanager incompat
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 21:28:34 +01:00
e8a069f788 Fix incorrect links in email templates
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 20:35:12 +01:00
c2212adf62 Adjust email tempates
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-04 20:34:36 +01:00
79d3ff2d9c Finalise register mail templates 2023-04-04 17:17:12 +01:00
fceee0b4ea Create 'sendTest' function for mail service 2023-04-04 14:41:14 +01:00
f03f02ede9 Continued email testing 2023-04-04 11:45:32 +01:00
184b7e50c3 Bump version and add dev tag 2023-04-04 11:03:22 +01:00
769946f818 Fix nodemailer 'require' name 2023-04-01 15:11:26 +01:00
062efd940f Beef out mail.services 2023-04-01 15:09:29 +01:00
81d3838588 Tidy app.js code 2023-04-01 14:44:06 +01:00
bd57449819 Add to mail.services
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-01 11:06:30 +01:00
28d72b128e Install nodemailer, update NPM packages, update mail template
Signed-off-by: Fred Boniface <fred@fjla.uk>
2023-04-01 10:42:20 +01:00