mirror of https://github.com/lus/pasty.git
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"`
|
ID string `json:"id" bson:"_id"`
|
||||||
Content string `json:"content" bson:"content"`
|
Content string `json:"content" bson:"content"`
|
||||||
SuggestedSyntaxType string `json:"suggestedSyntaxType" bson:"suggestedSyntaxType"`
|
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"`
|
Created int64 `json:"created" bson:"created"`
|
||||||
AutoDelete bool `json:"autoDelete" bson:"autoDelete"`
|
AutoDelete bool `json:"autoDelete" bson:"autoDelete"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,7 @@ func v1GetPaste(ctx *fasthttp.RequestCtx) {
|
||||||
ctx.SetBodyString("paste not found")
|
ctx.SetBodyString("paste not found")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
paste.DeletionToken = ""
|
||||||
|
|
||||||
// Respond with the paste
|
// Respond with the paste
|
||||||
jsonData, err := json.Marshal(paste)
|
jsonData, err := json.Marshal(paste)
|
||||||
|
|
Loading…
Reference in New Issue