mirror of
https://github.com/lus/pasty.git
synced 2023-08-10 21:13:09 +03:00
Prevent from sending deletion token hash
This commit is contained in:
parent
87450098cb
commit
078d9895a2
@ -11,7 +11,7 @@ type Paste struct {
|
||||
ID string `json:"id" bson:"_id"`
|
||||
Content string `json:"content" bson:"content"`
|
||||
SuggestedSyntaxType string `json:"suggestedSyntaxType" bson:"suggestedSyntaxType"`
|
||||
DeletionToken string `json:"deletionToken" bson:"deletionToken"`
|
||||
DeletionToken string `json:"deletionToken" bson:"deletionToken,omitempty"`
|
||||
Created int64 `json:"created" bson:"created"`
|
||||
AutoDelete bool `json:"autoDelete" bson:"autoDelete"`
|
||||
}
|
||||
|
@ -33,6 +33,7 @@ func v1GetPaste(ctx *fasthttp.RequestCtx) {
|
||||
ctx.SetBodyString("paste not found")
|
||||
return
|
||||
}
|
||||
paste.DeletionToken = ""
|
||||
|
||||
// Respond with the paste
|
||||
jsonData, err := json.Marshal(paste)
|
||||
|
Loading…
Reference in New Issue
Block a user