From 9d5d72d40fc5b8523ac3e7285323799318c470d6 Mon Sep 17 00:00:00 2001 From: Crytalenz Date: Fri, 1 Nov 2024 14:51:28 +0700 Subject: [PATCH] update --- store/members.ts | 2 +- types/index.d.ts | 1 - utils/cloudinary.ts | 40 ++++++++++++++++++++-------------------- 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/store/members.ts b/store/members.ts index 8f1377e..ec6119a 100644 --- a/store/members.ts +++ b/store/members.ts @@ -6,7 +6,7 @@ export const useMembers = defineStore('members', () => { const settings = useSettings() const { data: members, trySet, isValid } = useExpiredLocalStorage(`membersv15-${settings.group}`, 86400000) async function fetch() { - await trySet(async () => await $apiFetch('/api/member', { query: { group: settings.group, _v: 'v15' } })) + await trySet(async () => await $apiFetch('/api/member', { query: { group: settings.group, _v: 'v16' } })) } async function load() { diff --git a/types/index.d.ts b/types/index.d.ts index f9b28ba..2eea373 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -596,7 +596,6 @@ declare module 'cors' declare module 'vue-twitter-timeline' declare module 'hls.js/dist/hls.min.js' declare module 'vue-gtag-next' -declare module 'cloudinary' declare module 'horoscope' declare module 'vue-dndrop'; declare let Hls: any diff --git a/utils/cloudinary.ts b/utils/cloudinary.ts index 7c6b8c2..6da057d 100644 --- a/utils/cloudinary.ts +++ b/utils/cloudinary.ts @@ -1,21 +1,21 @@ -import cloudinary from 'cloudinary' -import config from '../app.config' +// import cloudinary from 'cloudinary' +// import config from '../app.config' -export function uploadImage(image: any): Promise { - return new Promise((resolve, reject) => { - cloudinary.v2.uploader.upload( - image, - { - folder: config.uploadFolder, - }, - (error: any, result: any) => { - if (error) { - return reject(error) - } - else { - return resolve(result) - } - }, - ) - }) -} +// export function uploadImage(image: any, config : ): Promise { +// return new Promise((resolve, reject) => { +// cloudinary.v2.uploader.upload( +// image, +// { +// folder: config.uploadFolder, +// }, +// (error: any, result: any) => { +// if (error) { +// return reject(error) +// } +// else { +// return resolve(result) +// } +// }, +// ) +// }) +// }