Run linter
This commit is contained in:
parent
b4eae5b0b3
commit
defbf2cdbe
3 changed files with 4 additions and 4 deletions
|
|
@ -6,12 +6,12 @@ async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule);
|
const app = await NestFactory.create(AppModule);
|
||||||
|
|
||||||
const logger = new Logger('bootstrap');
|
const logger = new Logger('bootstrap');
|
||||||
let origin = ['https://shows.everest.tailscale/admin/'];
|
const origin = ['https://shows.everest.tailscale/admin/'];
|
||||||
if (process.env.NODE_ENV == 'production') {
|
if (process.env.NODE_ENV == 'production') {
|
||||||
logger.log('In production mode');
|
logger.log('In production mode');
|
||||||
} else {
|
} else {
|
||||||
logger.log('In development mode');
|
logger.log('In development mode');
|
||||||
origin.push("http://localhost:4200")
|
origin.push('http://localhost:4200');
|
||||||
}
|
}
|
||||||
app.enableCors({
|
app.enableCors({
|
||||||
credentials: true,
|
credentials: true,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import { Schema } from 'mongoose';
|
||||||
export const ShowSchema = new Schema({
|
export const ShowSchema = new Schema({
|
||||||
title: { type: String, required: true },
|
title: { type: String, required: true },
|
||||||
date: { type: Date, required: true },
|
date: { type: Date, required: true },
|
||||||
seasons: { type: Number, required: true},
|
seasons: { type: Number, required: true },
|
||||||
episodes: { type: Number, required: true },
|
episodes: { type: Number, required: true },
|
||||||
description: { type: String, required: true },
|
description: { type: String, required: true },
|
||||||
genres: [{ type: String, required: true }],
|
genres: [{ type: String, required: true }],
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ export class ShowsController {
|
||||||
return {
|
return {
|
||||||
status: 'Ok',
|
status: 'Ok',
|
||||||
message: 'Show was created successfully',
|
message: 'Show was created successfully',
|
||||||
newId: newShow._id
|
newId: newShow._id,
|
||||||
};
|
};
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
throw new BadRequestException({
|
throw new BadRequestException({
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue