Skip to content
Snippets Groups Projects
Commit 80377962 authored by Steve Reis's avatar Steve Reis
Browse files

feature: Remove matomo configuration

parent fe680a12
No related branches found
No related tags found
No related merge requests found
import { registerAs } from '@nestjs/config';
import { parseToBoolean } from 'src/common/utils/shared.utils';
export default registerAs('matomo', () => {
return {
enabled: parseToBoolean(process.env.MATOMO_ENABLED, false),
urlBase: process.env.MATOMO_URL || undefined,
siteId: process.env.MATOMO_SITE_ID || undefined,
};
});
......@@ -38,7 +38,6 @@ export class EngineResolver {
@Public()
configuration(): Configuration {
const engineConf = this.engineService.getConfiguration();
const matomo = this.configSerivce.get('matomo');
const authConf: ConfigType<typeof authConfig> =
this.configSerivce.get('auth');
......@@ -48,7 +47,6 @@ export class EngineResolver {
skipTos: parseToBoolean(this.configSerivce.get(ENGINE_SKIP_TOS)),
enableSSO: parseToBoolean(authConf.enableSSO),
skipAuth: parseToBoolean(authConf.skipAuth, true),
matomo,
ontologyUrl: this.configSerivce.get(ENGINE_ONTOLOGY_URL),
contactLink: this.configSerivce.get(ENGINE_CONTACT_LINK),
};
......
import { Field, ObjectType } from '@nestjs/graphql';
import { Matomo } from './configuration/matomo.model';
@ObjectType()
export class Configuration {
@Field()
......@@ -34,9 +33,6 @@ export class Configuration {
@Field({ nullable: true, defaultValue: true })
enableSSO?: boolean;
@Field(() => Matomo, { nullable: true })
matomo?: Matomo;
@Field({ nullable: true })
ontologyUrl?: string;
}
import { Field, ObjectType } from '@nestjs/graphql';
@ObjectType()
export class Matomo {
@Field({ nullable: true, defaultValue: false })
enabled?: boolean;
@Field({ nullable: true })
siteId?: string;
@Field({ nullable: true })
urlBase?: string;
}
......@@ -9,7 +9,6 @@ import { AuthModule } from 'src/auth/auth.module';
import authConfig from 'src/config/auth.config';
import cacheConfig from 'src/config/cache.config';
import dbConfig from 'src/config/db.config';
import matomoConfig from 'src/config/matomo.config';
import { EngineModule } from 'src/engine/engine.module';
import { ExperimentsModule } from 'src/experiments/experiments.module';
import { FilesModule } from 'src/files/files.module';
......@@ -22,7 +21,7 @@ import { AppService } from './app.service';
ConfigModule.forRoot({
isGlobal: true,
envFilePath: ['.env', '.env.defaults'],
load: [dbConfig, matomoConfig, cacheConfig, authConfig],
load: [dbConfig, cacheConfig, authConfig],
}),
GraphQLModule.forRoot<ApolloDriverConfig>({
driver: ApolloDriver,
......
......@@ -26,12 +26,6 @@ type AuthenticationOutput {
refreshToken: String!
}
type Matomo {
enabled: Boolean
siteId: String
urlBase: String
}
type Configuration {
connectorId: String!
hasGalaxy: Boolean @deprecated(reason: "Only used for legacy reason should be avoided")
......@@ -43,7 +37,6 @@ type Configuration {
skipAuth: Boolean
skipTos: Boolean
enableSSO: Boolean
matomo: Matomo
ontologyUrl: String
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment