feat: add to field to specify the receiver (close #48)

This commit is contained in:
JustSong
2023-04-16 09:55:23 +08:00
parent 69f503124a
commit 3d38260e5b
10 changed files with 55 additions and 3 deletions
+2
View File
@@ -20,6 +20,7 @@ func GetPushMessage(c *gin.Context) {
URL: c.Query("url"),
Channel: c.Query("channel"),
Token: c.Query("token"),
To: c.Query("to"),
}
if message.Description == "" {
// Keep compatible with ServerChan
@@ -41,6 +42,7 @@ func PostPushMessage(c *gin.Context) {
Channel: c.PostForm("channel"),
Token: c.PostForm("token"),
Desp: c.PostForm("desp"),
To: c.PostForm("to"),
}
if message == (model.Message{}) {
// Looks like the user is using JSON