diff options
Diffstat (limited to 'routes/template.go')
-rw-r--r-- | routes/template.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/routes/template.go b/routes/template.go index 20d678b..0b03015 100644 --- a/routes/template.go +++ b/routes/template.go @@ -95,3 +95,10 @@ func (d *deps) showFile(content string, data map[string]any, w http.ResponseWrit return } } + +func (d *deps) showRaw(content string, w http.ResponseWriter) { + w.WriteHeader(http.StatusOK) + w.Header().Set("Content-Type", "text/plain") + w.Write([]byte(content)) + return +} |