diff --git a/src/backend/src/services/AppInformationService.js b/src/backend/src/services/AppInformationService.js index ecc67e53..b09b0b7a 100644 --- a/src/backend/src/services/AppInformationService.js +++ b/src/backend/src/services/AppInformationService.js @@ -140,7 +140,7 @@ class AppInformationService { const key_open_count = `apps:open_count:uid:${app_uid}`; const key_user_count = `apps:user_count:uid:${app_uid}`; const key_referral_count = `apps:referral_count:uid:${app_uid}`; - + const [cached_open_count, cached_user_count, cached_referral_count] = await Promise.all([ kv.get(key_open_count), kv.get(key_user_count), @@ -158,12 +158,12 @@ class AppInformationService { } const db = this.services.get('database').get(DB_READ, 'apps'); - + // Helper function to get timestamp for different periods const getTimeRange = (period) => { const now = new Date(); const today = new Date(now.getFullYear(), now.getMonth(), now.getDate()); - + switch(period) { case 'today': return { diff --git a/src/dev-center/js/dev-center.js b/src/dev-center/js/dev-center.js index db6bd784..ec87bd13 100644 --- a/src/dev-center/js/dev-center.js +++ b/src/dev-center/js/dev-center.js @@ -144,7 +144,7 @@ $(document).ready(function () { }) } // Get apps - puter.apps.list({params:{ icon_size: 64}}).then((resp) => { + puter.apps.list({ icon_size: 64 }).then((resp) => { apps = resp; // hide loading @@ -184,7 +184,7 @@ function refresh_app_list(show_loading = false) { // uncheck the select all checkbox $('.select-all-apps').prop('checked', false); - puter.apps.list({params:{ icon_size: 64}}).then((apps_res) => { + puter.apps.list({ icon_size: 64 }).then((apps_res) => { $('#loading').hide(); apps = apps_res; if (apps.length > 0) { @@ -315,7 +315,7 @@ async function create_app(title, source_path = null, items = null) { background: false, }).then(async (app) => { // refresh app list - puter.apps.list({params:{ icon_size: 64}}).then(async (resp) => { + puter.apps.list({ icon_size: 64 }).then(async (resp) => { apps = resp; // Close the 'Creting new app...' modal // but make sure it was shown for at least 2 seconds @@ -375,7 +375,7 @@ $(document).on('click', '.delete-app', async function (e) { let app_name = $(this).attr('data-app-name'); // get app - const app_data = await puter.apps.get(app_name, {params:{ icon_size: 16}}); + const app_data = await puter.apps.get(app_name, { icon_size: 16 }); if(app_data.metadata?.locked){ puter.ui.alert(`${app_data.title} is locked and cannot be deleted.`, [ @@ -758,7 +758,7 @@ async function edit_app_section(cur_app_name) { $('.tab-btn').removeClass('active'); $('.tab-btn[data-tab="apps"]').addClass('active'); - let cur_app = await puter.apps.get(cur_app_name, {params: {icon_size: 128}}); + let cur_app = await puter.apps.get(cur_app_name, {icon_size: 128}); currently_editing_app = cur_app; // generate edit app section @@ -1309,7 +1309,7 @@ $(document).on('click', '.delete-app-settings', async function (e) { let app_title = $(this).attr('data-app-title'); // check if app is locked - const app_data = await puter.apps.get(app_name, {params: {icon_size: 16}}); + const app_data = await puter.apps.get(app_name, {icon_size: 16}); if(app_data.metadata?.locked){ puter.ui.alert(`${app_data.title} is locked and cannot be deleted.`, [ @@ -1385,7 +1385,7 @@ $(document).on('click', '.back-to-main-btn', function (e) { // get apps $('#loading').show(); setTimeout(function () { - puter.apps.list({params: {icon_size: 64}}).then((apps_res) => { + puter.apps.list({icon_size: 64}).then((apps_res) => { // uncheck the select all checkbox $('.select-all-apps').prop('checked', false); @@ -2174,7 +2174,7 @@ $(document).on('click', '.insta-deploy-to-existing-app', function (e) { $('.insta-deploy-modal').get(0).close(); $('.insta-deploy-existing-app-select').get(0).showModal(); $('.insta-deploy-existing-app-list').html(`