Skip to content

Commit

Permalink
remove
Browse files Browse the repository at this point in the history
  • Loading branch information
oz-keisar-d committed Sep 11, 2024
1 parent 76e04f7 commit 8eff0cd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 1 addition & 19 deletions src/backend/utils/general.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os from 'os';
import jwt from 'jsonwebtoken';
import { SECRET_KEY, DEFAULT_SERVER_SETTINGS } from '../../consts';
import { DEFAULT_SERVER_SETTINGS } from '../../consts';
import {
getProjectPath,
getProjectServersNameList,
Expand Down Expand Up @@ -146,24 +146,6 @@ const verifyJWT = (jwtToken: string, username: string, secretKey: string) => {
}
};

export const activateProgram = async (key: string) => {
const { username } = os.userInfo();

const isValid = verifyJWT(key, username, SECRET_KEY);

if (isValid) {
const appSettings = await readAppSettings();

await updateAppSettings({
...appSettings,
activationKey: key,
});

return true;
}
return false;
};

export const getActiveProjectName = async () => {
const appSettings = await readAppSettings();

Expand Down
2 changes: 0 additions & 2 deletions src/consts/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ export const appSettingsFolder = `${mainFolderPath}settings/`;

export const SUPPORTED_PROJECT_DATA_VERSION = '0.0.9';

export const SECRET_KEY = 'verysecretkey';

export const DEFAULT_APP_SETTINGS: AppSettings = Object.freeze({
userApproveAnalytics: false,
serverDisabledUntil: null,
Expand Down

0 comments on commit 8eff0cd

Please sign in to comment.