mirror of
https://github.com/janishutz/MusicPlayerV2.git
synced 2025-11-25 04:54:23 +00:00
finish up FOSS version (mostly)
This commit is contained in:
@@ -9,8 +9,10 @@
|
|||||||
|
|
||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
|
|
||||||
|
|
||||||
|
// FOSS-VERSION: To enable the UI to be used with the FOSS version, change "isUserAuth" to true, you will be "logged in"
|
||||||
export const useUserStore = defineStore( 'user', {
|
export const useUserStore = defineStore( 'user', {
|
||||||
state: () => ( { 'isUserAuth': false, 'hasSubscribed': false, 'isUsingKeyboard': false, 'username': '', 'isFOSSVersion': false } ),
|
state: () => ( { 'isUserAuth': true, 'hasSubscribed': false, 'isUsingKeyboard': false, 'username': '', 'isFOSSVersion': false } ),
|
||||||
getters: {
|
getters: {
|
||||||
getUserAuthenticated: ( state ) => state.isUserAuth,
|
getUserAuthenticated: ( state ) => state.isUserAuth,
|
||||||
getSubscriptionStatus: ( state ) => state.hasSubscribed,
|
getSubscriptionStatus: ( state ) => state.hasSubscribed,
|
||||||
|
|||||||
@@ -26,14 +26,6 @@ declare module 'express-session' {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const routes = ( app: express.Application,
|
|
||||||
check_user: ( uid: string ) => Promise<boolean>,
|
|
||||||
save_user: ( uid: string, email: string, username: string ) => Promise<boolean>,
|
|
||||||
conf?: AuthSDKConfig
|
|
||||||
): undefined => {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
const getUserData = ( request: express.Request ) => {
|
const getUserData = ( request: express.Request ) => {
|
||||||
if ( !request.session.uid ) {
|
if ( !request.session.uid ) {
|
||||||
request.session.uid = crypto.randomUUID();
|
request.session.uid = crypto.randomUUID();
|
||||||
@@ -45,6 +37,5 @@ const getUserData = ( request: express.Request ) => {
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
checkAuth,
|
checkAuth,
|
||||||
routes,
|
|
||||||
getUserData
|
getUserData
|
||||||
}
|
}
|
||||||
@@ -6,11 +6,6 @@ const getSubscriptions = ( uid: string ) => {
|
|||||||
} ];
|
} ];
|
||||||
}
|
}
|
||||||
|
|
||||||
const configure = ( config: object ) => {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
getSubscriptions,
|
getSubscriptions,
|
||||||
configure
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user