mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
chore: Fix eslint errors in backend/src/helpers.js
/puter/packages/backend/src/helpers.js 682:9 error 'sharing_users' is not defined no-undef 689:12 error 'sharing_users' is not defined no-undef 690:28 error 'sharing_users' is not defined no-undef 695:28 error 'sharing_users' is not defined no-undef 720:9 error 'shared_fsentries' is not defined no-undef 733:12 error 'shared_fsentries' is not defined no-undef 734:28 error 'shared_fsentries' is not defined no-undef 735:17 error 'shared_fsentries' is not defined no-undef 735:58 error 'shared_fsentries' is not defined no-undef 736:31 error 'shared_fsentries' is not defined no-undef 900:57 error 'e' is not defined no-undef 1849:18 error Empty block statement no-empty
This commit is contained in:
parent
8ab1cd0ca8
commit
4879ee93bf
@ -681,7 +681,7 @@ const get_descendants_0 = async (path, user, depth, return_thumbnail = false) =>
|
|||||||
[user.id]
|
[user.id]
|
||||||
);
|
);
|
||||||
// users that have shared files/dirs with this user
|
// users that have shared files/dirs with this user
|
||||||
sharing_users = await db.read(
|
const sharing_users = await db.read(
|
||||||
`SELECT DISTINCT(owner_user_id), user.username
|
`SELECT DISTINCT(owner_user_id), user.username
|
||||||
FROM share
|
FROM share
|
||||||
INNER JOIN user ON user.id = share.owner_user_id
|
INNER JOIN user ON user.id = share.owner_user_id
|
||||||
@ -719,7 +719,7 @@ const get_descendants_0 = async (path, user, depth, return_thumbnail = false) =>
|
|||||||
return [];
|
return [];
|
||||||
|
|
||||||
// shared files/dirs with this user
|
// shared files/dirs with this user
|
||||||
shared_fsentries = await db.read(
|
const shared_fsentries = await db.read(
|
||||||
`SELECT
|
`SELECT
|
||||||
fsentries.id, fsentries.user_id, fsentries.uuid, fsentries.parent_uid, fsentries.bucket, fsentries.bucket_region,
|
fsentries.id, fsentries.user_id, fsentries.uuid, fsentries.parent_uid, fsentries.bucket, fsentries.bucket_region,
|
||||||
fsentries.name, fsentries.shortcut_to, fsentries.is_shortcut, fsentries.metadata, fsentries.is_dir, fsentries.modified,
|
fsentries.name, fsentries.shortcut_to, fsentries.is_shortcut, fsentries.metadata, fsentries.is_dir, fsentries.modified,
|
||||||
@ -899,7 +899,7 @@ const get_descendants = async (...args) => {
|
|||||||
if ( ! result || ! result[0] ) {
|
if ( ! result || ! result[0] ) {
|
||||||
errors.report('id2path.select', {
|
errors.report('id2path.select', {
|
||||||
alarm: true,
|
alarm: true,
|
||||||
message: `no result for ${entry_uid}: ${e.message}`,
|
message: `no result for ${entry_uid}`,
|
||||||
extra: {
|
extra: {
|
||||||
entry_uid,
|
entry_uid,
|
||||||
}
|
}
|
||||||
@ -953,12 +953,12 @@ function cp(source_path, dest_path, user, overwrite, change_name, check_perms =
|
|||||||
throw new Error(`legacy copy function called`);
|
throw new Error(`legacy copy function called`);
|
||||||
}
|
}
|
||||||
|
|
||||||
isString = function (variable) {
|
function isString(variable) {
|
||||||
return typeof variable === 'string' || variable instanceof String;
|
return typeof variable === 'string' || variable instanceof String;
|
||||||
}
|
}
|
||||||
|
|
||||||
// checks to see if given variable is an object
|
// checks to see if given variable is an object
|
||||||
isObject = function (variable) {
|
function isObject(variable) {
|
||||||
return variable !== null && typeof variable === 'object';
|
return variable !== null && typeof variable === 'object';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1809,7 +1809,7 @@ async function get_taskbar_items(user) {
|
|||||||
try {
|
try {
|
||||||
taskbar_items_from_db = JSON.parse(user.taskbar_items);
|
taskbar_items_from_db = JSON.parse(user.taskbar_items);
|
||||||
}catch(e){
|
}catch(e){
|
||||||
|
// ignore errors
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user