From baddef4c56051ecbd08d7fa0c93e6cf92d4091f8 Mon Sep 17 00:00:00 2001 From: HungLV Date: Sat, 17 Aug 2024 20:11:17 +0700 Subject: [PATCH] fix: trivials bugs --- docker-compose.yaml | 2 ++ src/apis/routes/users/create.ts | 2 +- src/apis/routes/users/update.ts | 2 +- src/configs/index.ts | 12 ++++++------ 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index dce71ba..5cf969f 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -50,6 +50,8 @@ services: ports: - '3000:3000' environment: + HOST: 0.0.0.0 + PORT: 3000 REDIS_URL: redis://redis:6379/1 DATABASE_URL: 'postgresql://postgres:password@postgres:5432/ip-scan?schema=public' ELASTICSEARCH_URL: http://elasticsearch:9200 diff --git a/src/apis/routes/users/create.ts b/src/apis/routes/users/create.ts index db1aea5..5e27916 100644 --- a/src/apis/routes/users/create.ts +++ b/src/apis/routes/users/create.ts @@ -3,7 +3,7 @@ import { prisma } from '#common/db'; import Joi from 'joi'; import { Prisma } from '@prisma/client'; -export const createUserionRoute: Hapi.ServerRoute = { +export const createUserRoute: Hapi.ServerRoute = { method: 'POST', path: '/users', options: { diff --git a/src/apis/routes/users/update.ts b/src/apis/routes/users/update.ts index 8e969de..7feefe3 100644 --- a/src/apis/routes/users/update.ts +++ b/src/apis/routes/users/update.ts @@ -8,7 +8,7 @@ export const updateUserRoute: Hapi.ServerRoute = { path: '/users/{id}', options: { description: 'Update user by its ID', - notes: 'Update user, its attributes and collections', + notes: 'Update user, its attributes', tags: ['api', 'user', 'update'], plugins: { 'hapi-swagger': {} }, validate: { diff --git a/src/configs/index.ts b/src/configs/index.ts index eea710b..acb5840 100644 --- a/src/configs/index.ts +++ b/src/configs/index.ts @@ -16,10 +16,10 @@ export const config = { chainId: Number(process.env.CHAIN_ID || 1), // AWS - s3Region: String(process.env.S3_REGION || ''), - s3AccessKeyId: String(process.env.S3_ACCESS_KEY_ID || ''), - s3SecretAccessKey: String(process.env.S3_ACCESS_KEY || ''), - s3DomainName: String(process.env.S3_DOMAIN_NAME || ''), - s3BucketName: String(process.env.S3_BUCKET_NAME || ''), - s3BucketFolder: String(process.env.S3_BUCKET_FOLDER || ''), + s3Region: String(process.env.S3_REGION || 'region'), + s3AccessKeyId: String(process.env.S3_ACCESS_KEY_ID || 'id'), + s3SecretAccessKey: String(process.env.S3_ACCESS_KEY || 'secret'), + s3DomainName: String(process.env.S3_DOMAIN_NAME || 'name'), + s3BucketName: String(process.env.S3_BUCKET_NAME || 'name'), + s3BucketFolder: String(process.env.S3_BUCKET_FOLDER || 'folder'), };