mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-02-07 13:59:01 +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) => {
|
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) : '_'
|
const group = user ? perms.group(user) : '_'
|
||||||
if (!group || !utils.retentions.periods[group]) {
|
if (!group || !utils.retentions.periods[group]) {
|
||||||
throw new ClientError('You are not eligible for any file retention periods.', { statusCode: 403 })
|
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) => {
|
self.bulkDeleteFromDb = async (field, values, user) => {
|
||||||
// Always return an empty array on failure
|
// 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
|
// SQLITE_LIMIT_VARIABLE_NUMBER, which defaults to 999
|
||||||
// Read more: https://www.sqlite.org/limits.html
|
// Read more: https://www.sqlite.org/limits.html
|
||||||
|
Loading…
Reference in New Issue
Block a user