mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Remove random println
This commit is contained in:
parent
5803cbdc3f
commit
81f6b2d263
@ -215,9 +215,7 @@ func handlePageRequest(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
p := Open(page)
|
p := Open(page)
|
||||||
fmt.Println(command)
|
|
||||||
if len(command) < 2 {
|
if len(command) < 2 {
|
||||||
fmt.Println(p.IsPublished)
|
|
||||||
if p.IsPublished {
|
if p.IsPublished {
|
||||||
c.Redirect(302, "/"+page+"/read")
|
c.Redirect(302, "/"+page+"/read")
|
||||||
} else {
|
} else {
|
||||||
@ -237,7 +235,6 @@ func handlePageRequest(c *gin.Context) {
|
|||||||
// Disallow anything but viewing locked/encrypted pages
|
// Disallow anything but viewing locked/encrypted pages
|
||||||
if (p.IsEncrypted || p.IsLocked) &&
|
if (p.IsEncrypted || p.IsLocked) &&
|
||||||
(command[0:2] != "/v" && command[0:2] != "/r") {
|
(command[0:2] != "/v" && command[0:2] != "/r") {
|
||||||
fmt.Println("IS LOCKED")
|
|
||||||
c.Redirect(302, "/"+page+"/view")
|
c.Redirect(302, "/"+page+"/view")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -295,12 +292,6 @@ func handlePageRequest(c *gin.Context) {
|
|||||||
c.Data(200, contentType(p.Name), []byte(rawText))
|
c.Data(200, contentType(p.Name), []byte(rawText))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
log.Debug(command)
|
|
||||||
log.Debug("%v", command[0:2] != "/e" &&
|
|
||||||
command[0:2] != "/v" &&
|
|
||||||
command[0:2] != "/l" &&
|
|
||||||
command[0:2] != "/h" &&
|
|
||||||
command[0:2] != "/r")
|
|
||||||
|
|
||||||
var FileNames, FileLastEdited []string
|
var FileNames, FileLastEdited []string
|
||||||
var FileSizes, FileNumChanges []int
|
var FileSizes, FileNumChanges []int
|
||||||
|
Loading…
Reference in New Issue
Block a user