Skip to content

Commit

Permalink
refactor: 📦 ⚡ Remove membership and live chat
Browse files Browse the repository at this point in the history
  • Loading branch information
JamsRepos committed Apr 6, 2024
1 parent 268fda9 commit 3b08550
Show file tree
Hide file tree
Showing 17 changed files with 0 additions and 1,260 deletions.
2 changes: 0 additions & 2 deletions apps/wizarr-backend/wizarr_backend/api/routes/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from .jellyfin_api import api as jellyfin_api
from .healthcheck_api import api as healthcheck_api
from .server_api import api as server_api
from .membership_api import api as membership_api

authorizations = {
"jsonWebToken": {
Expand Down Expand Up @@ -128,7 +127,6 @@ def handle_request_exception(error):
api.add_namespace(users_api)
api.add_namespace(utilities_api)
api.add_namespace(webhooks_api)
api.add_namespace(membership_api)

# Potentially remove this if it becomes unstable
# api.add_namespace(live_notifications_api)
Expand Down
61 changes: 0 additions & 61 deletions apps/wizarr-backend/wizarr_backend/api/routes/membership_api.py

This file was deleted.

27 changes: 0 additions & 27 deletions apps/wizarr-frontend/src/api/authentication.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { errorToast, infoToast, successToast } from "../ts/utils/toasts";
import { startAuthentication, startRegistration } from "@simplewebauthn/browser";

import type { APIUser } from "@/types/api/auth/User";
import type { Membership } from "@/types/api/membership";
import type { RegistrationResponseJSON } from "@simplewebauthn/typescript-types";
import type { WebAuthnError } from "@simplewebauthn/browser/dist/types/helpers/webAuthnError";
import { useAuthStore } from "@/stores/auth";
Expand Down Expand Up @@ -73,36 +72,10 @@ class Auth {
authStore.setAccessToken(token);
authStore.setRefreshToken(refresh_token);

// Handle membership update
const membership = await this.handleMembershipUpdate();
userStore.setMembership(membership);

// Reset the user data
return { user, token };
}

/**
* Handle Membership Update
* This function is used to handle membership updates
*/
async handleMembershipUpdate(): Promise<Membership | null> {
// Get the membership from the database
const response = await this.axios
.get("/api/membership", {
disableErrorToast: true,
disableInfoToast: true,
})
.catch(() => null);

// Check if the response is successful
if (response?.status != 200) {
return null;
}

// Get the membership from the response
return response.data;
}

/**
* Get the current user
* This method is used to get the current user
Expand Down
2 changes: 0 additions & 2 deletions apps/wizarr-frontend/src/assets/configs/DefaultValues.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export default {
latest_info: "Welcome to Wizarr, you can always find the latest information about Wizarr here!",
membership_api: "https://api.wizarr.dev/membership",
livechat_api: "https://api.wizarr.dev/livechat",
thank_you: "Thank you message has not been loaded from the remote configuration, please wait a few hours and try again.",
};
2 changes: 0 additions & 2 deletions apps/wizarr-frontend/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import FloatingVue from "floating-vue";
import Modal from "./plugins/modal";
import OpenLayersMap from "vue3-openlayers";
import ProgressOptions from "./assets/configs/DefaultProgress";
import RocketChat from "./plugins/rocketChat";
import Sentry from "./plugins/sentry";
import ToastOptions from "./assets/configs/DefaultToasts";
import ToastPlugin from "vue-toastification";
Expand Down Expand Up @@ -61,7 +60,6 @@ app.use(Modal);
app.use(WebShare);
app.use(Firebase);
app.use(Tours, { i18n: i18n });
app.use(RocketChat);

app.component("VueFeather", VueFeather);

Expand Down

This file was deleted.

18 changes: 0 additions & 18 deletions apps/wizarr-frontend/src/modules/settings/pages/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -253,24 +253,6 @@ export default defineComponent({
},
],
},
{
title: this.__("Members Only"),
description: this.__("These features are only available to paying members"),
pages: [
{
title: this.__("Membership"),
description: this.__("View and manage your membership"),
icon: "fas fa-cloud",
url: "/admin/settings/membership",
},
{
title: this.__("Live Support"),
description: this.__("Get live support from the server admins"),
icon: "fas fa-hands-helping",
url: "/admin/settings/support",
},
],
},
],
};
},
Expand Down
Loading

0 comments on commit 3b08550

Please sign in to comment.