mirror of
https://github.com/kevin-DL/full-stack-fastapi-postgresql.git
synced 2026-01-15 03:24:47 +00:00
Refactor/upgrade backend and frontend parts (#2)
* ♻️ Refactor and simplify backend code * ♻️ Refactor frontend state, integrate typesafe-vuex accessors into state files * ♻️ Use new state accessors and standardize layout * 🔒 Upgrade and fix npm security audit * 🔧 Update local re-generation scripts * 🔊 Log startup exceptions to detect errors early * ✏️ Fix password reset token content * 🔥 Remove unneeded Dockerfile directives * 🔥 Remove unnecessary print * 🔥 Remove unnecessary code, upgrade dependencies in backend * ✏️ Fix typos in docstrings and comments * 🏗️ Improve user Depends utilities to simplify and remove code * 🔥 Remove deprecated SQLAlchemy parameter
This commit is contained in:
committed by
GitHub
parent
9e0b826618
commit
cd112bd683
@@ -1,4 +1,6 @@
|
||||
import { MainState } from './state';
|
||||
import { getStoreAccessors } from 'typesafe-vuex';
|
||||
import { State } from '../state';
|
||||
|
||||
export const getters = {
|
||||
hasAdminAccess: (state: MainState) => {
|
||||
@@ -14,3 +16,14 @@ export const getters = {
|
||||
isLoggedIn: (state: MainState) => state.isLoggedIn,
|
||||
firstNotification: (state: MainState) => state.notifications.length > 0 && state.notifications[0],
|
||||
};
|
||||
|
||||
const {read} = getStoreAccessors<MainState, State>('');
|
||||
|
||||
export const readDashboardMiniDrawer = read(getters.dashboardMiniDrawer);
|
||||
export const readDashboardShowDrawer = read(getters.dashboardShowDrawer);
|
||||
export const readHasAdminAccess = read(getters.hasAdminAccess);
|
||||
export const readIsLoggedIn = read(getters.isLoggedIn);
|
||||
export const readLoginError = read(getters.loginError);
|
||||
export const readToken = read(getters.token);
|
||||
export const readUserProfile = read(getters.userProfile);
|
||||
export const readFirstNotification = read(getters.firstNotification);
|
||||
|
||||
Reference in New Issue
Block a user