1
Fork 0

Update Git URL

This commit is contained in:
Jan-Lukas Else 2020-04-16 10:55:30 +02:00
parent e236b11ca1
commit 1a7b1f0d2f
3 changed files with 3 additions and 3 deletions

2
go.mod
View File

@ -1,4 +1,4 @@
module codeberg.org/jlelse/goshort module git.jlel.se/jlelse/GoShort
go 1.14 go 1.14

View File

@ -82,7 +82,7 @@ func migrateDatabase() {
Migrations: []*migrate.Migration{ Migrations: []*migrate.Migration{
{ {
Id: "001", Id: "001",
Up: []string{"create table redirect(slug text not null primary key,url text not null,hits integer default 0 not null);insert into redirect (slug, url) values ('source', 'https://codeberg.org/jlelse/GoShort');"}, Up: []string{"create table redirect(slug text not null primary key,url text not null,hits integer default 0 not null);insert into redirect (slug, url) values ('source', 'https://git.jlel.se/jlelse/GoShort');"},
Down: []string{"drop table redirect;"}, Down: []string{"drop table redirect;"},
}, },
}, },

View File

@ -66,7 +66,7 @@ func TestShortenedUrlHandler(t *testing.T) {
w := httptest.NewRecorder() w := httptest.NewRecorder()
ShortenedUrlHandler(w, req) ShortenedUrlHandler(w, req)
resp := w.Result() resp := w.Result()
if resp.Header.Get("Location") != "https://codeberg.org/jlelse/GoShort" { if resp.Header.Get("Location") != "https://git.jlel.se/jlelse/GoShort" {
t.Error() t.Error()
} }
}) })