Learn the names of those in your organization. Written by Joseph White, 2016-2017. Unauthorized use prohibited.
feature/groups
- Do we want to index routes based on username or ids? What should the address look like in the app?
- Make user be able to change password via update. (no hook currently on findOneAndUpdate)
- Make user.ts work properly: cannot create duplicate usernames. Bookmarks: Temp/Mongoose force unique folder
- Test password updating in user.ts. You may need to change pre('findOneAndUpdate') to a save hook on the Schema, or just use pre('findByIdAndUpdate').
- Test user and group to make sure all functionality still works in Postman
- Implement permissions.ts methods and commented-out routes in routes.ts.
- Make a way to create a group and view people within a certain group or ALL groups user can access. Make group be selectable via dropdown in add and add-multi routes
Other
- Fix gulp issues: copy pages folder and use watch + livereload for everything.
- express session secret should be saved internally
- Make deletion of group possible, and a hook to delete the images in the folder.
- Make deletion of people delete the correct image.
- Make users only view their own images
- Make users not be able to access each other's data and not be able to edit their username, privileges, etc, without ADMIN rights
- Expire authenticated sessions after a certain amount of time
- Serve dist/public (see server.ts)
- Add multiple users from JSON expects object not array (Error in resource configuration for action
save
. Expected response to contain an object but got an array (Request: POST /api/people)) - Add "Welcome Joseph" to Angular app by using Jade data?
- get scss source maps to load
-
Setup development environment (below)
-
Download ward directory
- Navigate to your ward's directory on lds.org.
- Inject dist/setup/downloadInfo.js into Chrome developer console
- Wait for photos and data.json to download
- Import ward directory
- run dist/server/upload.js on server and follow its directions to upload photos
- use Angular app at localhost:8020 to upload all data.
Run the following commands
npm install
- install all dependenciesnpm run watch
- gulp watch for changes in TS codenpm start
- start your server (./restart.sh
in production)
Note: gulp build
and gulp
may be substituted for
npm run build
and npm run watch
if you have gulp installed globally.
dist/
- dist/client includes HTML assets and app.bundle.js (bundle of all src/client code). HTML assets include favicon.ico, images/, and vendor/ (all in root, except images is in assets/)
- dist/server and dist/setup are mirrors of these directories in src/
src/client/
- images - images used in app
- vendor - libraries included in app
- app.bundle.js, app.bundle.js.map - angular app
src/server/
- controllers - REST API endpoints
- models - Mongoose interaction with database
- routes.ts - App routes
- server.ts - Server start script
src/setup/
- scripts to download lds.org data and add to database
temp/ (default location)
- data - add your images and json downloaded from lds.org
- If applicable, body contains the object to insert, or an array of objects
// 200 OK, 201 CREATED, 400 BAD_REQUEST, 401 UNAUTHORIZED, 404 NOT_FOUND // 200 is implied but we are being verbose here
- If error, status code is 4xx or 5xx and body is an error message (string)
- Otherwise, status code is 2xx and body is an object or an array of objects related to the request