1
0
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:
Lukas SP 2020-10-02 18:25:39 +02:00
parent 87450098cb
commit 078d9895a2
2 changed files with 2 additions and 1 deletions

View File

@ -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"`
}

View File

@ -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)