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:
Sam Atkins 2024-05-01 10:47:58 +01:00
parent 01ab6b88ea
commit 0df0de6507

View File

@ -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) => {