acalza / uoftbiohacks Goto Github PK
View Code? Open in Web Editor NEWUofTBiohacks CRUD app
UofTBiohacks CRUD app
Can we make the submit button functional at any point but if user fails to complete required fields we mark them red?
All Universities should be in the same format
perfect for admin who wants to see bio, and those who want to view the bios of the group.
Create this properly
Use a regex to check if the post request is using an email or not, then check validation
Title says it all
since users can have only one group. The ability to create more than one group overrides previously created groups. so maybe add some constraint when saving group to database. preferably using database operators/flags over if statements.
Mark:
move trim into util, also I will be using trim probably, so check if the variable is undefined, before you trim it, change that please.
also this.response.message = 'invalid email' in validate user, remove that, just send a 400 and leave it at that.
Make a new file for validateUser and put it into auth folder, also due to poor naming (On my end) we are renaming it to validateCredentials, move that in the auth folder.
Also mark, make sure to document your code.
Once again, this will expose you more to the code and getting the hang of it, once that's done, we can move forward with the back end.
Julian/Mark
As of now, it will have register, and login, and about.
Very similar to /group/:groupid/accept but instead reject, and do your thing.
koa-session uses cookies and those are set in the browser by the "Set-Cookie" response header. React app (or browser) is not responding to this header, or ignoring it for security, so cookies not being set. see: How to get a cookie from AJAX response. Works from postman though.
see: hacks_cookies-problem.mp4
decided solution: JWT
Moi
In components/Login/Login.js
right now it just alerts based on response. the links to user/all
and user/all/csv
wont work. Don't use cookies yet - just get an auth request to work first. save token info in the state of this component, instead of <a href="http://localhost:3000/user/all">users as JSON</a>
make a getUsers
function which is triggered onClick of something, and that function will set the auth headers and get the users.json, log it.
once that is done move onto cookies.
(wrapped by canUseDOM
, ofc)
...low priority, but for code consistency and bundle size
as title
make a route group/:groupid/remove which removes the user from the group, do not forget to remove the user id from the group Schema and save, and as well as removing it from the user.
" .post('/:groupid/invite', function () {
//Use .invites to add the current group to the other user's invite array
});
"
Post request which will be a JSON such that { userid: mongoose.ObjectID}, push the current group in the params (which is a mongoose objectID to the user invites array.
Can we make the submit button functional at any point but if user fails to complete required fields we mark them red?
Right now it is default icon. Making this issue so I don't forget
Make a route for group/:groupid/accept, remember this.userModel is always going to be there, so use that as reference because in the invites array you MUST pop it and save it, then assign the user model group the new groupID, finally return us a JSON like this.
{
userModel: usermodel,
groupModel: groupModel,
message:
}
AS usuall handle bad requests.
On null you can't trim, so you can blindly trim variables, it throws an error.
It looks like I can create endless number of groups
Read in the fields from a JSON or something so that we don't need to make sure the frontend form matches with the backend post request, and so we can easily add/remove fields as per seray's desires
Line 42 in group.js "// GET: sends group with attached group info. although i think should be able to incorporate with router.param.
.get('/:groupid', function* () {
this.body = this.groupModel;
});"
I need you to to get all the information from the group, including the users, since group.users references to another schema (being the user schema) I need you to populate, and return the group model JSON with .users being an array of JSON user models that are contained in the group.
Go from an old old old old commit, and find the csv downloader, make it the route /user/all/csv, and same with the other route /user/all which returned the JSON of it.
nodemailer, use your own email for now
We need to encrypt the front end with at least a basic hash like md5 hash, because every so often the password gets exposed with the get, so we can at least hash it if for some reason that happens, it's better than nothing. Refer to #8, we'll do a combo of both at the end of the day, though any other suggestions would be appreciated. Might research this a bit more
Get official logos from CSSU, OG, etc. for sponsors and partners section of homepage
Make an error page, the sooner the better.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.