Added link info endpoint

This commit is contained in:
2022-08-28 15:01:02 +02:00
parent 0944a14a97
commit 9da60fa4e7
8 changed files with 107 additions and 2 deletions

View File

@@ -38,6 +38,7 @@ func (l *ShortenUrlLogic) ShortenUrl(req *types.ShortenReq) (resp *types.Shorten
insertUrl.BindStruct(db.UrlModel{
ID: id,
LongUrl: req.LongUrl,
Lifespan: req.ExpiresAfter,
CreatedAt: time.Now(),
})
@@ -48,5 +49,6 @@ func (l *ShortenUrlLogic) ShortenUrl(req *types.ShortenReq) (resp *types.Shorten
resp = &types.ShortenResp{
ID: id,
}
return resp, nil
}