Skip to content
This repository was archived by the owner on Aug 30, 2020. It is now read-only.

Commit c7da36d

Browse files
author
Hongze Xia
committed
rm reference to email
1 parent 5f34ab5 commit c7da36d

File tree

4 files changed

+0
-84
lines changed

4 files changed

+0
-84
lines changed

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ POST `http://localhost:8080/create`
7979
"expectedPrice": "$120.49",
8080
"name": "Braun Thermoscan 7 IRT 6520",
8181
"options": {
82-
"email": "user@gmail.com"
8382
}
8483
}
8584
```
@@ -104,7 +103,6 @@ POST `http://localhost:8080/update`
104103
{
105104
"key": "EhcKDHByaWNlLXRyYWNrcxCAgICgpPOTCa",
106105
"options": {
107-
"email": "user@gmail.com"
108106
}
109107
}
110108
```

email/client.go

Lines changed: 0 additions & 75 deletions
This file was deleted.

handlers/update.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ func MakeUpdate(client *pushover.Client) echo.HandlerFunc {
3030
if req.Options.AlertType != "" {
3131
entity.Options.AlertType = req.Options.AlertType
3232
}
33-
if req.Options.Email != "" {
34-
entity.Options.Email = req.Options.Email
35-
}
3633
if req.Options.CheckFreq != 0 {
3734
entity.Options.CheckFreq = req.Options.CheckFreq
3835
}

models/requests.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import "cloud.google.com/go/datastore"
55
type (
66
// Options is the options for an entry
77
Options struct {
8-
Email string `json:"email"`
98
CheckFreq int16 `json:"checkFreq"` // in minutes
109
AlertType string `json:"alertType"`
1110
Threshold float32 `json:"threshold"`
@@ -51,9 +50,6 @@ func (r *CreateRequest) Validate() (string, bool) {
5150
if r.ExpectedPrice == "" {
5251
return "expectedPrice is not set", false
5352
}
54-
if r.Options == nil {
55-
return "options.email is not set", false
56-
}
5753
r.Options.setDefault()
5854
return "", true
5955
}

0 commit comments

Comments
 (0)