docs: update test script.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu
2022-05-08 12:23:42 +08:00
parent 3a593aacb1
commit e89ea00626
3 changed files with 30 additions and 7 deletions

View File

@@ -32,3 +32,16 @@ run the following command.
```sh
bat POST localhost:8088/api/push < tests/test.json
```
Here is a sample shell code to calculate factorial using while loop:
```sh
#!/bin/bash
counter=$1
while [ $counter -gt 0 ]
do
bat POST https://gorush.netlify.app/api/push < tests/test.json
counter=$(( $counter - 1 ))
echo $counter
done
```

View File

@@ -3,12 +3,20 @@
{
"tokens": ["token_a", "token_b"],
"platform": 1,
"message": "Hello World iOS!"
"message": "Hello World iOS!",
"title": "Gorush with iOS"
},
{
"tokens": ["token_a", "token_b"],
"platform": 2,
"message": "Hello World Android!"
"message": "Hello World Android!",
"title": "Gorush with Android"
},
{
"tokens": ["token_a", "token_b"],
"platform": 3,
"message": "Hello World Huawei!",
"title": "Gorush with HMS"
}
]
}