mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Merge 55c07c6f87
into a58f4ca346
This commit is contained in:
commit
748d1162a7
@ -405,13 +405,15 @@ func (s *Site) handlePageRequest(c *gin.Context) {
|
||||
|
||||
// Destroy page if it is opened and primed
|
||||
if p.IsPrimedForSelfDestruct && !isLocked && !p.IsEncrypted {
|
||||
p.Update("<center><em>This page has self-destructed. You cannot return to it.</em></center>\n\n" + p.Text.GetCurrent())
|
||||
p.Erase()
|
||||
if p.IsPublished {
|
||||
command = "/read"
|
||||
} else {
|
||||
command = "/view"
|
||||
if command != "/raw" {
|
||||
p.Update("<center><em>This page has self-destructed. You cannot return to it.</em></center>\n\n" + p.Text.GetCurrent())
|
||||
if p.IsPublished {
|
||||
command = "/read"
|
||||
} else {
|
||||
command = "/view"
|
||||
}
|
||||
}
|
||||
p.Erase()
|
||||
}
|
||||
if command == "/erase" {
|
||||
if !isLocked && !p.IsEncrypted {
|
||||
|
Loading…
Reference in New Issue
Block a user