PublicApi: Add correct prefix

Using nest-router for this purpose as it is a rather easy addition to our structure. As we don't add the Router to any e2e tests we don't need to change them.

fixes #523

Signed-off-by: Philip Molares <philip.molares@udo.edu>
This commit is contained in:
Philip Molares 2021-02-15 10:26:12 +01:00 committed by David Mehren
parent 0366cb491f
commit 698dd1a634
No known key found for this signature in database
GPG key ID: 185982BA4C42B7C3
3 changed files with 17 additions and 2 deletions

View file

@ -27,9 +27,18 @@ import databaseConfig from './config/database.config';
import authConfig from './config/auth.config';
import { PrivateApiModule } from './api/private/private-api.module';
import { ScheduleModule } from '@nestjs/schedule';
import { RouterModule, Routes } from 'nest-router';
const routes: Routes = [
{
path: '/api/v2',
module: PublicApiModule,
},
];
@Module({
imports: [
RouterModule.forRoutes(routes),
TypeOrmModule.forRoot({
type: 'sqlite',
database: './hedgedoc.sqlite',