INNER CODE UNIT · JavaScript

getAppId

currycan/HaTickets · desktop/src/sql/index.js:26

export const getAppId = async () => {
    const res = await selectAll(settingTableName);
    if(Array.isArray(res) && res.length) {
        return res[0].appid
    }

    return ''
}

// 修改log 表名
// 表名通过数据库中取
export const changeLogTableName = async () => {
    await initDb();
    // 设置唯一表名
    const appId = await getAppId()
    if(appId) {
        // Validate appId format before using in table name
        if (/^[a-zA-Z0-9_]+$/.test(appId)) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…