Skip to content

Commit 49fb073

Browse files
committed
fix readme typo
1 parent de1a51a commit 49fb073

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

README.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ Some developer return error as 200 response and attach his own error code and me
130130

131131
With FireCall, no more "you return your error, I return my error, he return his error", everybody simply return a god damn standard HTTPS error.
132132

133-
FireCall standardize the way of handling these errors for you.
133+
FireCall standardize the way of handling these errors, there is only ONE way.
134134

135135
There is also one common issue where developer often calling the wrong function name which lead to CORS error, basically front end and backend are not tally with each other.
136136

137137
So to solve this is we prepare a schema and share it to both front end and back end, by doing this not only we make sure that the function name is correct, but also we make sure that the data type is correct.
138138

139139
It is very similar to how Graphql schema sharing works, but way much simpler and we all know how convoluted Graphql is.
140140

141-
Long thing short, FireCall make sure that there is only one way to do stuff and giving you absolute type safe at both compile and run time.
141+
Long thing short, FireCall make sure that there is only one way to do stuff and providing you absolute type safe at both compile and run time with single source of truth(zod).
142142

143143
## Installation
144144

@@ -179,7 +179,9 @@ export const updateUserSchema = {
179179
}
180180

181181
export const getUserSchema = {
182-
res: z.string(), // userId
182+
//request data schema
183+
req: z.string(), // userId
184+
// response data schema
183185
res: z.object({
184186
name: z.string(),
185187
age: z.number(),

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "firecall",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"description": "🔥Write callable functions systematically like a Firelord. No more chaotic error handling, no more unsafe endpoint data type, no more messy validation. Be the Master of Fire you always wanted to be.",
55
"source": "src/index.ts",
66
"main": "dist/index.js",

src/onCall.test.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-ignore
21
import { onCall } from './onCall'
32
import { z } from 'zod'
43
import fftest from 'firebase-functions-test'

0 commit comments

Comments
 (0)