Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
crstlnz committed Nov 1, 2024
1 parent 32be06f commit 9d5d72d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 22 deletions.
2 changes: 1 addition & 1 deletion store/members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export const useMembers = defineStore('members', () => {
const settings = useSettings()
const { data: members, trySet, isValid } = useExpiredLocalStorage<IMember[]>(`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() {
Expand Down
1 change: 0 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
40 changes: 20 additions & 20 deletions utils/cloudinary.ts
Original file line number Diff line number Diff line change
@@ -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<any> {
return new Promise<any>((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<any> {
// return new Promise<any>((resolve, reject) => {
// cloudinary.v2.uploader.upload(
// image,
// {
// folder: config.uploadFolder,
// },
// (error: any, result: any) => {
// if (error) {
// return reject(error)
// }
// else {
// return resolve(result)
// }
// },
// )
// })
// }

0 comments on commit 9d5d72d

Please sign in to comment.