-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve security for queue settings #233
Changes from 1 commit
229dcd4
7fd261e
0e85f72
0e8dbbc
b46f45f
638b5b1
b4a9cd0
fc91573
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,13 +113,25 @@ router.get( | |
}, | ||
required: false, | ||
include: [User], | ||
attributes: ['startTime', 'endTime'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you clarify why the changes in this file were necessary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can't find the exact change from v5, but without |
||
}, | ||
{ | ||
model: Question, | ||
required: false, | ||
where: { | ||
dequeueTime: null, | ||
}, | ||
attributes: [ | ||
'id', | ||
'name', | ||
'topic', | ||
'beingAnswered', | ||
'answerStartTime', | ||
'enqueueTime', | ||
'dequeueTime', | ||
'askedById', | ||
], | ||
include: [{ model: User, as: 'askedBy' }], | ||
}, | ||
], | ||
order: [[Question, 'id', 'ASC']], | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify why there changes were necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We expect that the object returned from
Question.build
contains the appropriateaskedBy
model through association, but it doesn't do that anymore.The docs suggest to use
.create
to create with association.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking through the docs some more, it's possible to use
.build()
to achieve the same effect, but since we're not doing anything special between.build()
and.save()
, I don't see a reason to use it over.create()