forked from mxx1111/mdlook
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.ts
More file actions
23 lines (19 loc) · 699 Bytes
/
Copy pathconfig.ts
File metadata and controls
23 lines (19 loc) · 699 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { addPrefix } from '@/utils'
import { store } from '@/utils/storage'
export interface WechatImageCredentials {
appId: string
appSecret: string
}
export const wechatImageAppId = store.reactive(addPrefix(`wechat_mp_app_id`), ``)
export const wechatImageAppSecret = store.reactive(addPrefix(`wechat_mp_app_secret`), ``)
export function getWechatImageCredentials(): WechatImageCredentials | null {
const appId = wechatImageAppId.value.trim()
const appSecret = wechatImageAppSecret.value.trim()
if (!appId || !appSecret)
return null
return { appId, appSecret }
}
export function clearWechatImageCredentials() {
wechatImageAppId.value = ``
wechatImageAppSecret.value = ``
}