Add version number
This commit is contained in:
parent
248dff015b
commit
79b376a659
|
@ -0,0 +1,6 @@
|
|||
package core
|
||||
|
||||
// Version will return the current version.
|
||||
func Version() string {
|
||||
return "v0.1.0"
|
||||
}
|
|
@ -9,4 +9,5 @@ type Page struct {
|
|||
Error []string
|
||||
Success []string
|
||||
Notice []string
|
||||
Version string
|
||||
}
|
||||
|
|
|
@ -8,12 +8,13 @@ import (
|
|||
"strings"
|
||||
|
||||
"tildegit.org/andinus/perseus/auth"
|
||||
"tildegit.org/andinus/perseus/core"
|
||||
"tildegit.org/andinus/perseus/storage/sqlite3"
|
||||
)
|
||||
|
||||
// HandleRegister handles /register pages.
|
||||
func HandleRegister(w http.ResponseWriter, r *http.Request, db *sqlite3.DB) {
|
||||
p := Page{}
|
||||
p := Page{Version: core.Version()}
|
||||
p.Notice = []string{
|
||||
"Only [a-z] & [0-9] allowed for username",
|
||||
"Password length must be greater than 8 characters",
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
/
|
||||
<a href="https://andinus.nand.sh/perseus">Perseus</a>
|
||||
<span style="float:right">
|
||||
Perseus {{ .Version }}
|
||||
/
|
||||
<a href="https://tildegit.org/andinus/perseus">
|
||||
Source Code
|
||||
</a>
|
||||
|
|
Loading…
Reference in New Issue