* F

* F

Co-authored-by: Janos Dobronszki <dobronszki@gmail.com>
This commit is contained in:
Asim Aslam
2021-05-18 22:25:07 +01:00
committed by GitHub
parent 7c5ec79fdf
commit bca7c7f509

View File

@@ -14,7 +14,7 @@ import (
url "github.com/micro/services/url/proto" url "github.com/micro/services/url/proto"
) )
const hostPrefix = "https://m3o.one/u" const hostPrefix = "https://m3o.one/u/"
type Url struct { type Url struct {
pairs model.Model pairs model.Model
@@ -85,7 +85,7 @@ func (e *Url) List(ctx context.Context, req *url.ListRequest, rsp *url.ListRespo
return err return err
} }
for _, v := range rsp.UrlPairs { for _, v := range rsp.UrlPairs {
v.ShortURL = e.hostPrefix + "/" + v.ShortURL v.ShortURL = e.hostPrefix + v.ShortURL
} }
return nil return nil
} }