Remove appstore web token api
This commit is contained in:
@@ -20,7 +20,6 @@ exports = module.exports = {
|
||||
purchaseApp,
|
||||
unpurchaseApp,
|
||||
|
||||
getWebToken,
|
||||
getSubscription,
|
||||
isFreePlan,
|
||||
|
||||
@@ -124,15 +123,6 @@ async function registerUser(email, password) {
|
||||
if (response.status !== 201) throw new BoxError(BoxError.EXTERNAL_ERROR, `Registration error. invalid response: ${response.status}`);
|
||||
}
|
||||
|
||||
async function getWebToken() {
|
||||
if (constants.DEMO) throw new BoxError(BoxError.BAD_FIELD, 'Not allowed in demo mode');
|
||||
|
||||
const token = await settings.set(settings.APPSTORE_WEB_TOKEN_KEY);
|
||||
if (!token) throw new BoxError(BoxError.NOT_FOUND); // user will have to re-login with password somehow
|
||||
|
||||
return token;
|
||||
}
|
||||
|
||||
async function getSubscription() {
|
||||
const token = await settings.get(settings.APPSTORE_API_TOKEN_KEY);
|
||||
if (!token) throw new BoxError(BoxError.LICENSE_ERROR, 'Missing token');
|
||||
@@ -312,7 +302,6 @@ async function registerCloudron(data) {
|
||||
|
||||
await settings.set(settings.CLOUDRON_ID_KEY, response.body.cloudronId);
|
||||
await settings.set(settings.APPSTORE_API_TOKEN_KEY, response.body.cloudronToken);
|
||||
await settings.set(settings.APPSTORE_WEB_TOKEN_KEY, accessToken);
|
||||
|
||||
debug(`registerCloudron: Cloudron registered with id ${response.body.cloudronId}`);
|
||||
}
|
||||
@@ -372,7 +361,6 @@ async function registerCloudronWithLogin(options) {
|
||||
async function unregister() {
|
||||
await settings.set(settings.CLOUDRON_ID_KEY, '');
|
||||
await settings.set(settings.APPSTORE_API_TOKEN_KEY, '');
|
||||
await settings.set(settings.APPSTORE_WEB_TOKEN_KEY, '');
|
||||
}
|
||||
|
||||
async function createTicket(info, auditSource) {
|
||||
|
||||
Reference in New Issue
Block a user