Skip to content

Commit

Permalink
DEC-623: Switch from joi to zod
Browse files Browse the repository at this point in the history
  • Loading branch information
luixo committed Nov 8, 2022
1 parent f3c0ad1 commit 6b16292
Show file tree
Hide file tree
Showing 40 changed files with 2,112 additions and 2,414 deletions.
1 change: 0 additions & 1 deletion backend/.env.nest
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ LOG_INDEXER=false
EMAIL_TOKEN_EXPIRY_MIN=10
RESEND_VERIFICATION_RATE_LIMIT_MILLIS=2000

TELEGRAM_ENABLE_WEBHOOK=false
FRONTEND_BASE_URL=http://localhost:3000

FIREBASE_CLIENT_CONFIG={"apiKey":"AIzaSyAPEZMnzIy-JAi-Q-701bDXxygQCjqwxzs","authDomain":"developer-platform-local.firebaseapp.com","projectId":"developer-platform-local","storageBucket":"developer-platform-local.appspot.com","messagingSenderId":"78552755554","appId":"1:78552755554:web:e20f5431637aa1f0a8503b","measurementId":"G-MHKWBN39VF"}
6 changes: 3 additions & 3 deletions backend/.env.nest.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ FIREBASE_CLIENT_CONFIG=<required firebase client secret>
PROJECT_REF_PREFIX=<personal identifier and underscore (e.g. `mp_` for Michael Peter)>
MOCK_KEY_SERVICE=<true or false>

TELEGRAM_ENABLE_WEBHOOK=<true or false>
TELEGRAM_BOT_TOKEN=<required if TELEGRAM_ENABLE_WEBHOOK is true>
TELEGRAM_SECRET=<required if TELEGRAM_ENABLE_WEBHOOK is true>
# both keys below are required if you want to enable telegram hook
TELEGRAM_BOT_TOKEN=
TELEGRAM_SECRET=

MOCK_EMAIL_SERVICE=<true or false>
MAILGUN_DOMAIN=
Expand Down
2 changes: 1 addition & 1 deletion backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ This is an RPC-style API. All endpoints are POSTs and all bodies are JSON. This

## Input Validation

All endpoints which accept input (JSON bodies) should validate that input with [Joi](https://joi.dev/). The best way to learn how to do this is to inspect an existing endpoint.
All endpoints which accept input (JSON bodies) should validate that input with [zod](https://github.com/colinhacks/zod). The best way to learn how to do this is to inspect an existing endpoint.

## Authentication

Expand Down
7 changes: 0 additions & 7 deletions backend/modules/template/dto.ts

This file was deleted.

2 changes: 0 additions & 2 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"express": "^4.18.1",
"firebase-admin": "^10.0.0",
"form-data": "^4.0.0",
"joi": "^17.4.2",
"kysely": "^0.20.0",
"luxon": "^3.0.1",
"mailgun.js": "^7.0.2",
Expand All @@ -55,7 +54,6 @@
"@nestjs/testing": "^8.0.0",
"@types/express": "^4.17.13",
"@types/jest": "^27.0.1",
"@types/joi": "^17.2.3",
"@types/luxon": "^3.0.0",
"@types/node": "^16.0.0",
"@types/pg": "^8.6.5",
Expand Down
Loading

0 comments on commit 6b16292

Please sign in to comment.