allow faq to avoid editting time limit

This commit is contained in:
keyan 2021-10-30 14:59:21 -05:00
parent 6dfbd1d1ce
commit 725c05dd69
1 changed files with 2 additions and 1 deletions

View File

@ -236,7 +236,8 @@ export default {
throw new AuthenticationError('item does not belong to you')
}
if (Date.now() > new Date(item.createdAt).getTime() + 10 * 60000) {
// if it's not the FAQ and older than 10 minutes
if (item.id !== 349 && Date.now() > new Date(item.createdAt).getTime() + 10 * 60000) {
throw new UserInputError('item can no longer be editted')
}