summaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorSteve Manuel <nilslice@gmail.com>2016-10-28 13:07:53 -0700
committerSteve Manuel <nilslice@gmail.com>2016-10-28 13:07:53 -0700
commita4ff81d168e159f18b6d68e2c26ab4416ca66b20 (patch)
tree425d469cab2c8082e4706fa2d9d7fabf9b087399 /system
parent8ff77bc0aa766dcd33fd4458557444defa76d87b (diff)
moving non-switch code out of switch
Diffstat (limited to 'system')
-rw-r--r--system/admin/handlers.go27
1 files changed, 14 insertions, 13 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go
index 8cbfe0a..3960eed 100644
--- a/system/admin/handlers.go
+++ b/system/admin/handlers.go
@@ -628,31 +628,32 @@ func postsHandler(res http.ResponseWriter, req *http.Request) {
</div>`
if hasExt {
created := q.Get("created")
- switch created {
- q.Set("created", "internal")
- intURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host)
- q.Set("created", "external")
- extURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host)
+ q.Set("created", "internal")
+ intURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host)
+
+ q.Set("created", "external")
+ extURL := strings.TrimPrefix(req.URL.String(), req.URL.Scheme+req.URL.Host)
+
+ switch created {
+ case "internal":
- case "internal":
-
html += `<div class="row">
Created by:
- <a class="active" href="`+ intURL +`">Internal</a>
+ <a class="active" href="` + intURL + `">Internal</a>
&nbsp;&vert;&nbsp;
- <a href="`+ extURL +`">External</a>
+ <a href="` + extURL + `">External</a>
</div>`
- case "external":
+ case "external":
html += `<div class="row">
Created by:
- <a href="`+ intURL +`">Internal</a>
+ <a href="` + intURL + `">Internal</a>
&nbsp;&vert;&nbsp;
- <a class="active" href="`+ extURL +`">External</a>
+ <a class="active" href="` + extURL + `">External</a>
</div>`
}
-
+
}
html += `<ul class="posts row">`