1
0
mirror of https://github.com/schollz/cowyo.git synced 2023-08-10 21:13:00 +03:00

Goto "/view" when decrypting a self-destructing page

Fixes #81
This commit is contained in:
Zack Scholl 2017-09-28 02:06:38 -06:00
parent ce2deee49f
commit b286fae089

View File

@ -132,6 +132,7 @@ func handlePageRequest(c *gin.Context) {
if p.IsPrimedForSelfDestruct && !p.IsLocked && !p.IsEncrypted { if p.IsPrimedForSelfDestruct && !p.IsLocked && !p.IsEncrypted {
p.Update("*This page has self-destructed. You can not return to it.*\n\n" + p.Text.GetCurrent()) p.Update("*This page has self-destructed. You can not return to it.*\n\n" + p.Text.GetCurrent())
p.Erase() p.Erase()
command = "/view"
} }
if command == "/erase" { if command == "/erase" {
if !p.IsLocked && !p.IsEncrypted { if !p.IsLocked && !p.IsEncrypted {