major: Rename legalconsenthub to gremiumhub
All checks were successful
CI/CD Pipeline / frontend (push) Successful in 5m52s
CI/CD Pipeline / backend (push) Successful in 7m58s
CI/CD Pipeline / deploy (push) Successful in 1s

This commit is contained in:
2026-03-16 10:28:32 +01:00
parent 52fe6b6392
commit afec157b35
326 changed files with 566 additions and 1004 deletions

View File

@@ -1,34 +0,0 @@
import type { UpdateEmailPreferencesDto, UserDto } from '~~/.api-client'
import { useUserApi } from '~/composables'
export function useUser() {
const userApi = useUserApi()
async function getUserById(userId: string): Promise<UserDto> {
return await userApi.getUserById(userId)
}
async function updateEmailPreferences(
userId: string,
email: string | null,
emailOnFormCreated: boolean,
emailOnFormSubmitted: boolean,
emailOnFormUpdated: boolean,
emailOnCommentAdded: boolean
): Promise<UserDto> {
const updateDto: UpdateEmailPreferencesDto = {
email,
emailOnFormCreated,
emailOnFormSubmitted,
emailOnFormUpdated,
emailOnCommentAdded
}
return await userApi.updateEmailPreferences(userId, updateDto)
}
return {
getUserById,
updateEmailPreferences
}
}

View File

@@ -1,30 +0,0 @@
import { UserApi, Configuration, type UserDto, type UpdateEmailPreferencesDto } from '~~/.api-client'
import { cleanDoubleSlashes, withoutTrailingSlash } from 'ufo'
import { wrappedFetchWrap } from '~/utils/wrappedFetch'
export function useUserApi() {
const appBaseUrl = useRuntimeConfig().app.baseURL
const { serverApiBasePath, clientProxyBasePath } = useRuntimeConfig().public
const basePath = withoutTrailingSlash(
cleanDoubleSlashes(import.meta.client ? appBaseUrl + clientProxyBasePath : clientProxyBasePath + serverApiBasePath)
)
const userApiClient = new UserApi(new Configuration({ basePath, fetchApi: wrappedFetchWrap(useRequestFetch()) }))
async function getUserById(id: string): Promise<UserDto> {
return userApiClient.getUserById({ id })
}
async function updateEmailPreferences(
id: string,
updateEmailPreferencesDto: UpdateEmailPreferencesDto
): Promise<UserDto> {
return userApiClient.updateUserEmailPreferences({ id, updateEmailPreferencesDto })
}
return {
getUserById,
updateEmailPreferences
}
}