mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-31 07:11:33 +00:00
chore: indents and comments
This commit is contained in:
parent
d7d6a29123
commit
7381cac0e9
@ -217,8 +217,11 @@ self.unholdUploadIdentifiers = res => {
|
||||
}
|
||||
|
||||
self.assertRetentionPeriod = (user, age) => {
|
||||
if (!utils.retentions.enabled) return null
|
||||
if (!utils.retentions.enabled) {
|
||||
return null
|
||||
}
|
||||
|
||||
// _ is special key for non-registered users (no auth requests)
|
||||
const group = user ? perms.group(user) : '_'
|
||||
if (!group || !utils.retentions.periods[group]) {
|
||||
throw new ClientError('You are not eligible for any file retention periods.', { statusCode: 403 })
|
||||
|
@ -602,7 +602,9 @@ self.unlinkFile = async (filename, predb) => {
|
||||
|
||||
self.bulkDeleteFromDb = async (field, values, user) => {
|
||||
// Always return an empty array on failure
|
||||
if (!user || !['id', 'name'].includes(field) || !values.length) return []
|
||||
if (!user || !['id', 'name'].includes(field) || !values.length) {
|
||||
return []
|
||||
}
|
||||
|
||||
// SQLITE_LIMIT_VARIABLE_NUMBER, which defaults to 999
|
||||
// Read more: https://www.sqlite.org/limits.html
|
||||
|
Loading…
Reference in New Issue
Block a user