Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit e4441ec

Browse files
committedDec 21, 2021
Rename
1 parent 49d9f9b commit e4441ec

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎http.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func eventStream(event string, p *migration.Payload) http.HandlerFunc {
4444
b, _ := json.Marshal(otp{
4545
ID: op.UUID(),
4646
Code: op.EvaluateString(),
47-
Time: op.Second(),
47+
Time: op.Seconds(),
4848
})
4949
fmt.Fprintf(w, "event: %s\r\n", event)
5050
fmt.Fprintf(w, "data: %s\r\n\r\n", string(b))

‎migration/evaluate.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ func totp(op *Payload_OtpParameters) uint64 {
5353
return uint64(now().Unix()) / uint64(period.Seconds())
5454
}
5555

56-
// Second of current validity frame
57-
func (op *Payload_OtpParameters) Second() float64 {
56+
// Seconds of current validity frame
57+
func (op *Payload_OtpParameters) Seconds() float64 {
5858
return now().Sub(now().Truncate(period)).Seconds()
5959
}
6060

0 commit comments

Comments
 (0)
Please sign in to comment.