Merge branch 'main' of github.com:Chroma-Case/Chromacase into design
This commit is contained in:
+7
-6
@@ -10,7 +10,7 @@ import {
|
|||||||
} from '@nestjs/common';
|
} from '@nestjs/common';
|
||||||
import { RequestLogger, RequestLoggerOptions } from 'json-logger-service';
|
import { RequestLogger, RequestLoggerOptions } from 'json-logger-service';
|
||||||
import { tap } from 'rxjs';
|
import { tap } from 'rxjs';
|
||||||
import { PrismaModel } from './_gen/prisma-class'
|
import { PrismaModel } from './_gen/prisma-class';
|
||||||
import { PrismaService } from './prisma/prisma.service';
|
import { PrismaService } from './prisma/prisma.service';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
@@ -32,15 +32,14 @@ export class AspectLogger implements NestInterceptor {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return next.handle().pipe(
|
return next.handle().pipe(
|
||||||
tap((data) =>
|
tap((/* data */) =>
|
||||||
console.log(
|
console.log(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
...toPrint,
|
...toPrint,
|
||||||
statusCode,
|
statusCode,
|
||||||
data,
|
//data, //TODO: Data crashed with images
|
||||||
}),
|
}),
|
||||||
),
|
),),
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,7 +58,9 @@ async function bootstrap() {
|
|||||||
.setDescription('The chromacase API')
|
.setDescription('The chromacase API')
|
||||||
.setVersion('1.0')
|
.setVersion('1.0')
|
||||||
.build();
|
.build();
|
||||||
const document = SwaggerModule.createDocument(app, config, { extraModels: [...PrismaModel.extraModels]});
|
const document = SwaggerModule.createDocument(app, config, {
|
||||||
|
extraModels: [...PrismaModel.extraModels],
|
||||||
|
});
|
||||||
SwaggerModule.setup('api', app, document);
|
SwaggerModule.setup('api', app, document);
|
||||||
|
|
||||||
app.useGlobalPipes(new ValidationPipe());
|
app.useGlobalPipes(new ValidationPipe());
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- back
|
- back
|
||||||
- front
|
- front
|
||||||
|
- scorometer
|
||||||
volumes:
|
volumes:
|
||||||
- "./front/assets:/assets:ro"
|
- "./front/assets:/assets:ro"
|
||||||
- "./front/nginx.conf.template.dev:/etc/nginx/templates/default.conf.template:ro"
|
- "./front/nginx.conf.template.dev:/etc/nginx/templates/default.conf.template:ro"
|
||||||
|
|||||||
+2
-1
@@ -23,6 +23,7 @@ import { AccessTokenResponseHandler } from './models/AccessTokenResponse';
|
|||||||
import * as yup from 'yup';
|
import * as yup from 'yup';
|
||||||
import { base64ToBlob } from './utils/base64ToBlob';
|
import { base64ToBlob } from './utils/base64ToBlob';
|
||||||
import { ImagePickerAsset } from 'expo-image-picker';
|
import { ImagePickerAsset } from 'expo-image-picker';
|
||||||
|
import Constant from 'expo-constants';
|
||||||
|
|
||||||
type AuthenticationInput = { username: string; password: string };
|
type AuthenticationInput = { username: string; password: string };
|
||||||
type RegistrationInput = AuthenticationInput & { email: string };
|
type RegistrationInput = AuthenticationInput & { email: string };
|
||||||
@@ -68,7 +69,7 @@ export default class API {
|
|||||||
public static readonly baseUrl =
|
public static readonly baseUrl =
|
||||||
process.env.NODE_ENV != 'development' && Platform.OS === 'web'
|
process.env.NODE_ENV != 'development' && Platform.OS === 'web'
|
||||||
? '/api'
|
? '/api'
|
||||||
: 'https://nightly.chroma.octohub.app/api';
|
: Constant.manifest?.extra?.apiUrl;
|
||||||
public static async fetch(
|
public static async fetch(
|
||||||
params: FetchParams,
|
params: FetchParams,
|
||||||
handle: Pick<Required<HandleParams>, 'raw'>
|
handle: Pick<Required<HandleParams>, 'raw'>
|
||||||
|
|||||||
Reference in New Issue
Block a user