mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
Update paste report webhook request
This commit is contained in:
@@ -10,9 +10,8 @@ import (
|
||||
|
||||
// ReportRequest represents a report request sent to the report webhook
|
||||
type ReportRequest struct {
|
||||
Paste string `json:"paste"`
|
||||
Reason string `json:"reason"`
|
||||
Timestamp int64 `json:"timestamp"`
|
||||
Paste string `json:"paste"`
|
||||
Reason string `json:"reason"`
|
||||
}
|
||||
|
||||
// ReportResponse represents a report response received from the report webhook
|
||||
|
||||
@@ -255,9 +255,8 @@ func endpointReportPaste(ctx *fasthttp.RequestCtx) {
|
||||
}
|
||||
|
||||
request := &report.ReportRequest{
|
||||
Paste: ctx.UserValue("_paste").(*shared.Paste).ID,
|
||||
Reason: payload.Reason,
|
||||
Timestamp: time.Now().Unix(),
|
||||
Paste: ctx.UserValue("_paste").(*shared.Paste).ID,
|
||||
Reason: payload.Reason,
|
||||
}
|
||||
response, err := report.SendReport(request)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user