Compare commits
4
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e68889b35 | ||
|
|
135e0d2dc7 | ||
|
|
b4c23a09bf | ||
|
|
1c08647742 |
@@ -197,6 +197,12 @@ func (a *apiServer) handleCreatePasteMultipart(w http.ResponseWriter, r *http.Re
|
|||||||
writeErrCode(w, 400, "burn_invalid", "burn_after_reads must be a positive number")
|
writeErrCode(w, 400, "burn_invalid", "burn_after_reads must be a positive number")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// negative values are invalid too: same 400 burn_invalid shape
|
||||||
|
// as the JSON path (validate.go:92), identical message text.
|
||||||
|
if err := parseBurnAfterReads(n); err != nil {
|
||||||
|
writeErrCode(w, 400, "burn_invalid", err.Error())
|
||||||
|
return
|
||||||
|
}
|
||||||
p.BurnAfterReads = &n
|
p.BurnAfterReads = &n
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user