2 Commits

Author SHA1 Message Date
60a2c4c817 wip 2023-09-23 10:53:13 +02:00
c1073cf337 Fix log error for images 2023-09-21 17:03:03 +02:00
6 changed files with 146 additions and 2327 deletions

View File

@@ -10,7 +10,7 @@ import {
} from '@nestjs/common';
import { RequestLogger, RequestLoggerOptions } from 'json-logger-service';
import { tap } from 'rxjs';
import { PrismaModel } from './_gen/prisma-class'
import { PrismaModel } from './_gen/prisma-class';
import { PrismaService } from './prisma/prisma.service';
@Injectable()
@@ -32,15 +32,14 @@ export class AspectLogger implements NestInterceptor {
};
return next.handle().pipe(
tap((data) =>
tap((/* data */) =>
console.log(
JSON.stringify({
...toPrint,
statusCode,
data,
//data, //TODO: Data crashed with images
}),
),
),
),),
);
}
}
@@ -59,7 +58,9 @@ async function bootstrap() {
.setDescription('The chromacase API')
.setVersion('1.0')
.build();
const document = SwaggerModule.createDocument(app, config, { extraModels: [...PrismaModel.extraModels]});
const document = SwaggerModule.createDocument(app, config, {
extraModels: [...PrismaModel.extraModels],
});
SwaggerModule.setup('api', app, document);
app.useGlobalPipes(new ValidationPipe());

View File

@@ -77,6 +77,7 @@ services:
depends_on:
- back
- front
- scorometer
volumes:
- "./front/assets:/assets:ro"
- "./front/nginx.conf.template.dev:/etc/nginx/templates/default.conf.template:ro"

View File

@@ -23,6 +23,7 @@ import { AccessTokenResponseHandler } from './models/AccessTokenResponse';
import * as yup from 'yup';
import { base64ToBlob } from './utils/base64ToBlob';
import { ImagePickerAsset } from 'expo-image-picker';
import Constant from 'expo-constants';
type AuthenticationInput = { username: string; password: string };
type RegistrationInput = AuthenticationInput & { email: string };
@@ -68,7 +69,7 @@ export default class API {
public static readonly baseUrl =
process.env.NODE_ENV != 'development' && Platform.OS === 'web'
? '/api'
: 'https://nightly.chroma.octohub.app/api';
: Constant.manifest?.extra?.apiUrl;
public static async fetch(
params: FetchParams,
handle: Pick<Required<HandleParams>, 'raw'>

View File

@@ -1,10 +1,6 @@
# a Dockerfile to build the expo web app and serve it with nginx
#
# Build the app
FROM node:16-alpine as build
WORKDIR /app
# install expo cli
RUN yarn global add expo-cli@6.0.5
# add sharp-cli (^2.1.0) for faster image processing
RUN yarn global add sharp-cli@^2.1.0

View File

@@ -4,10 +4,6 @@
"main": "node_modules/expo/AppEntry.js",
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"web": "expo start --web",
"eject": "expo eject",
"pretty:check": "prettier --check .",
"pretty:write": "prettier --write .",
"lint": "eslint .",
@@ -32,9 +28,7 @@
"@types/react-query": "^1.2.9",
"@types/react-test-renderer": "^18.0.0",
"add": "^2.0.6",
"expo": "^47.0.8",
"expo-asset": "~8.7.0",
"expo-dev-client": "~2.0.1",
"expo-image-picker": "~14.0.2",
"expo-linear-gradient": "~12.0.1",
"expo-linking": "~3.3.1",
@@ -57,7 +51,6 @@
"react": "18.2.0",
"react-dom": "18.1.0",
"react-i18next": "^11.18.3",
"react-native": "0.70.5",
"react-native-chart-kit": "^6.12.0",
"react-native-paper": "^4.12.5",
"react-native-reanimated": "~2.12.0",

File diff suppressed because it is too large Load Diff