Globally renamed property RedirectUrl
to LongUrl
This commit is contained in:
@ -39,7 +39,7 @@ func (l *ExpandUrlLogic) ExpandUrl(req *types.ExpandReq) (resp *types.ExpandResp
|
||||
}
|
||||
|
||||
resp = &types.ExpandResp{
|
||||
RedirectUrl: urls[0].RedirectUrl,
|
||||
LongUrl: urls[0].LongUrl,
|
||||
}
|
||||
|
||||
return resp, err
|
||||
|
@ -30,8 +30,8 @@ func (l *ShortenUrlLogic) ShortenUrl(req *types.ShortenReq) (resp *types.Shorten
|
||||
|
||||
insertUrl := db.UrlTable.InsertBuilder().TTL(30 * time.Second).Query(l.svcCtx.DB)
|
||||
insertUrl.BindStruct(db.UrlModel{
|
||||
ID: id,
|
||||
RedirectUrl: req.RedirectUrl,
|
||||
ID: id,
|
||||
LongUrl: req.LongUrl,
|
||||
})
|
||||
|
||||
if err := insertUrl.ExecRelease(); err != nil {
|
||||
|
Reference in New Issue
Block a user