mirror of
https://github.com/HeyPuter/puter
synced 2024-11-15 06:15:47 +00:00
chore: Define def() and defv() using const
Fixes these eslint issues: /puter/packages/backend/src/services/auth/TokenService.js 3:1 error 'def' is not defined no-undef 18:1 error 'defv' is not defined no-undef 61:11 error 'def' is not defined no-undef 69:21 error 'defv' is not defined no-undef
This commit is contained in:
parent
01ab6b88ea
commit
0df0de6507
@ -1,6 +1,6 @@
|
|||||||
const BaseService = require("../BaseService");
|
const BaseService = require("../BaseService");
|
||||||
|
|
||||||
def = o => {
|
const def = o => {
|
||||||
for ( let k in o ) {
|
for ( let k in o ) {
|
||||||
if ( typeof o[k] === 'string' ) {
|
if ( typeof o[k] === 'string' ) {
|
||||||
o[k] = { short: o[k] };
|
o[k] = { short: o[k] };
|
||||||
@ -15,7 +15,7 @@ def = o => {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
defv = o => {
|
const defv = o => {
|
||||||
return {
|
return {
|
||||||
to_short: o,
|
to_short: o,
|
||||||
to_long: Object.keys(o).reduce((acc, key) => {
|
to_long: Object.keys(o).reduce((acc, key) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user