Fixed logo
This commit is contained in:
parent
66c1c2198b
commit
a77b72f22d
1 changed files with 46 additions and 48 deletions
94
main.go
94
main.go
|
|
@ -117,7 +117,7 @@ func pageIndex(w http.ResponseWriter, r *http.Request) {
|
||||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
|
||||||
</head>
|
</head>
|
||||||
<body style="margin: 32px">
|
<body style="margin: 32px">
|
||||||
<div style="margin-bottom: 32px"><img src="/images/logo.svg"></div>
|
<div style="margin-bottom: 32px"><img src="https://u-lug.org/images/logo.svg"></div>
|
||||||
<div>Skapar länk...</div>
|
<div>Skapar länk...</div>
|
||||||
|
|
||||||
<div id="link"></div>
|
<div id="link"></div>
|
||||||
|
|
@ -164,59 +164,57 @@ func createInvite(w http.ResponseWriter, r *http.Request) {
|
||||||
email := fmt.Sprintf("%08d@example.com", seq)
|
email := fmt.Sprintf("%08d@example.com", seq)
|
||||||
expire := time.Now().Add(time.Hour * 24 * 7)
|
expire := time.Now().Add(time.Hour * 24 * 7)
|
||||||
|
|
||||||
if false {
|
// legacy_object
|
||||||
// legacy_object
|
key := fmt.Sprintf("invitation:uid:2:invited:%s", email)
|
||||||
key := fmt.Sprintf("invitation:uid:2:invited:%s", email)
|
_, err = db.Exec(` INSERT INTO public.legacy_object(_key, "type", "expireAt") VALUES($1, 'string', null)`, key)
|
||||||
_, err = db.Exec(` INSERT INTO public.legacy_object(_key, "type", "expireAt") VALUES($1, 'string', null)`, key)
|
if err != nil {
|
||||||
if err != nil {
|
w.Write([]byte(err.Error()))
|
||||||
w.Write([]byte(err.Error()))
|
return
|
||||||
return
|
}
|
||||||
}
|
|
||||||
|
|
||||||
key = fmt.Sprintf("invitation:invited:%s", email)
|
key = fmt.Sprintf("invitation:invited:%s", email)
|
||||||
_, err = db.Exec(` INSERT INTO public.legacy_object(_key, "type", "expireAt") VALUES($1, 'set', null)`, key)
|
_, err = db.Exec(` INSERT INTO public.legacy_object(_key, "type", "expireAt") VALUES($1, 'set', null)`, key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
key = fmt.Sprintf("invitation:token:%s", newUUID)
|
key = fmt.Sprintf("invitation:token:%s", newUUID)
|
||||||
_, err = db.Exec(` INSERT INTO public.legacy_object(_key, "type", "expireAt") VALUES($1, 'hash', $2)`, key, expire)
|
_, err = db.Exec(` INSERT INTO public.legacy_object(_key, "type", "expireAt") VALUES($1, 'hash', $2)`, key, expire)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// legacy_hash
|
// legacy_hash
|
||||||
key = fmt.Sprintf("invitation:token:%s", newUUID)
|
key = fmt.Sprintf("invitation:token:%s", newUUID)
|
||||||
data := fmt.Sprintf(`{"email": "%s", "token": "%s", "inviter": 2, "groupsToJoin": "[]"}`, email, newUUID)
|
data := fmt.Sprintf(`{"email": "%s", "token": "%s", "inviter": 2, "groupsToJoin": "[]"}`, email, newUUID)
|
||||||
_, err = db.Exec(` INSERT INTO public.legacy_hash(_key, "data", "type") VALUES($1, $2, 'hash')`, key, data)
|
_, err = db.Exec(` INSERT INTO public.legacy_hash(_key, "data", "type") VALUES($1, $2, 'hash')`, key, data)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// legacy_set
|
// legacy_set
|
||||||
key = "invitation:uid:2"
|
key = "invitation:uid:2"
|
||||||
_, err = db.Exec(` INSERT INTO public.legacy_set(_key, "member", "type") VALUES($1, $2, 'set')`, key, email)
|
_, err = db.Exec(` INSERT INTO public.legacy_set(_key, "member", "type") VALUES($1, $2, 'set')`, key, email)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
key = fmt.Sprintf("invitation:invited:%s", email)
|
key = fmt.Sprintf("invitation:invited:%s", email)
|
||||||
_, err = db.Exec(` INSERT INTO public.legacy_set(_key, "member", "type") VALUES($1, $2, 'set')`, key, newUUID)
|
_, err = db.Exec(` INSERT INTO public.legacy_set(_key, "member", "type") VALUES($1, $2, 'set')`, key, newUUID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
key = fmt.Sprintf("invitation:uid:2:invited:%s", email)
|
key = fmt.Sprintf("invitation:uid:2:invited:%s", email)
|
||||||
_, err = db.Exec(` INSERT INTO public.legacy_string(_key, "data", "type") VALUES($1, $2, 'string')`, key, newUUID)
|
_, err = db.Exec(` INSERT INTO public.legacy_string(_key, "data", "type") VALUES($1, $2, 'string')`, key, newUUID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
w.Write([]byte(err.Error()))
|
w.Write([]byte(err.Error()))
|
||||||
return
|
return
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
j, _ := json.Marshal(struct {
|
j, _ := json.Marshal(struct {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue