Browse Source

Update Git URL

master
Jan-Lukas Else 1 year ago
parent
commit
1a7b1f0d2f
  1. 2
      go.mod
  2. 2
      main.go
  3. 2
      main_test.go

2
go.mod

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

2
main.go

@ -82,7 +82,7 @@ func migrateDatabase() {
Migrations: []*migrate.Migration{
{
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;"},
},
},

2
main_test.go

@ -66,7 +66,7 @@ func TestShortenedUrlHandler(t *testing.T) {
w := httptest.NewRecorder()
ShortenedUrlHandler(w, req)
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()
}
})

Loading…
Cancel
Save