style: fix linting issues met ESLint
This commit is contained in:
parent
d49e32a241
commit
56d34adbc0
3 changed files with 6 additions and 10 deletions
|
@ -2,7 +2,7 @@ import {EntityRepository, FilterQuery} from '@mikro-orm/core';
|
|||
import {EntityAlreadyExistsException} from "../exceptions/entity-already-exists-exception";
|
||||
|
||||
export abstract class DwengoEntityRepository<T extends object> extends EntityRepository<T> {
|
||||
public async save(entity: T, options?: {preventOverwrite?: Boolean}): Promise<void> {
|
||||
public async save(entity: T, options?: {preventOverwrite?: boolean}): Promise<void> {
|
||||
if (options?.preventOverwrite && await this.findOne(entity)) {
|
||||
throw new EntityAlreadyExistsException(`A ${this.getEntityName()} with this identifier already exists.`);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ function config(testingMode: boolean = false): Options {
|
|||
password: getEnvVar(EnvVars.DbPassword),
|
||||
entities: entities,
|
||||
persistOnCreate: false, // Entities should not be implicitly persisted when calling create(...), but only after
|
||||
// they were saved explicitly.
|
||||
// They were saved explicitly.
|
||||
// EntitiesTs: entitiesTs,
|
||||
|
||||
// Logging
|
||||
|
|
|
@ -4,22 +4,18 @@ import {type MaybeRefOrGetter, toValue} from "vue";
|
|||
|
||||
const themeController = getThemeController();
|
||||
|
||||
export const useThemeQuery = (language: MaybeRefOrGetter<string>) => {
|
||||
return useQuery({
|
||||
export const useThemeQuery = (language: MaybeRefOrGetter<string>) => useQuery({
|
||||
queryKey: ['themes', language],
|
||||
queryFn: () => {
|
||||
const lang = toValue(language);
|
||||
return themeController.getAll(lang);
|
||||
},
|
||||
enabled: () => !!toValue(language),
|
||||
enabled: () => Boolean(toValue(language)),
|
||||
});
|
||||
};
|
||||
|
||||
export const useThemeHruidsQuery = (themeKey: string | null) => {
|
||||
return useQuery({
|
||||
export const useThemeHruidsQuery = (themeKey: string | null) => useQuery({
|
||||
queryKey: ['theme-hruids', themeKey],
|
||||
queryFn: () => themeController.getHruidsByKey(themeKey!),
|
||||
enabled: !!themeKey,
|
||||
enabled: Boolean(themeKey),
|
||||
});
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue