Skip to content

Conversation

@jtwalters25
Copy link

No description provided.

userID: { type: Schema.Types.ObjectId, required: true },//make sure its part of the correct gallery
galleryID: { type: Schema.Types.ObjectId, required: true },
imageURI: { type: String, required: true, unique: true },//what comes back from s3
objectKey: { type: String, required: true, unique: true },//also comes back from s3
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that you are taking notes to remind yourself what things are. I take notes in my code as well. Sometimes if I have questions I will note them in there as well and just remove them before pushing.

debug('POST: /api/gallery');

if(!req.body.name) return next(createError(400, 'no name'));
if(!req.body.desc) return next(createError(400, 'no description'));
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job adding extra error checking in here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants