Skip to content

Commit

Permalink
fix readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Apr 5, 2024
1 parent 0a52d8d commit 2cd5819
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
29 changes: 3 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,34 +94,11 @@ Response example:
{"result": "ok"}
```

### POST /push/fcm
### POST /push/fcm **Deprecated**

To delivery remote notifications via FCM (legacy) API to user's devices.
This API has been deleted at v0.6.0. Use `/push/fcm/v1` instead.

Post body format is equal to it for FCM legacy origin server.

example:
```json
{
"registration_ids": [
"token1",
"token2"
],
"data": {
"id": "2",
"message": "Test2"
},
"notification": {
"title": "message_title",
"body": "message_body"
}
}
```

Response example:
```json
{"result": "ok"}
```
See also https://firebase.google.com/docs/cloud-messaging/migrate-v1 .

### POST /push/fcm/v1

Expand Down
4 changes: 2 additions & 2 deletions server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ func TestInvalidCertification(t *testing.T) {
c, _ := config.LoadConfig("./test/gunfish_test.toml")
c.Apns.CertFile = "./test/invalid.crt"
c.Apns.KeyFile = "./test/invalid.key"
ss, err := gunfish.StartSupervisor(&c)
_, err := gunfish.StartSupervisor(&c)
if err != nil {
t.Errorf("Expected supervisor cannot start because of using invalid certification files.: %v", ss)
t.Errorf("Expected supervisor cannot start %s", err)
}
}

Expand Down

0 comments on commit 2cd5819

Please sign in to comment.