edit: field Shortcode dan expire duration
This commit is contained in:
@@ -48,7 +48,7 @@ func (s *DBShortLink) ToShortLink() *models.ShortLink {
|
||||
|
||||
return &models.ShortLink{
|
||||
ID: fmt.Sprintf("%d", s.ShortlinkID),
|
||||
Token: s.ShortlinkCode,
|
||||
Shortcode: s.ShortlinkCode,
|
||||
PatientID: s.Shortlink_PatientID,
|
||||
StudyUID: s.Shortlink_Study_IUID,
|
||||
HashedDOB: s.ShortlinkHashDoB,
|
||||
@@ -113,7 +113,7 @@ func (r *ShortLinkRepository) CreateShortLinkTx(tx *sqlx.Tx, shortLink *models.S
|
||||
|
||||
_, err = tx.Exec(
|
||||
query,
|
||||
shortLink.Token,
|
||||
shortLink.Shortcode,
|
||||
shortLink.PatientID,
|
||||
shortLink.StudyUID,
|
||||
shortLink.HashedDOB,
|
||||
@@ -148,7 +148,7 @@ func (r *ShortLinkRepository) UpdateShortLinkTx(tx *sqlx.Tx, shortLink *models.S
|
||||
shortLink.IsRevoked,
|
||||
shortLink.RemainingTries,
|
||||
expiresAt,
|
||||
shortLink.Token,
|
||||
shortLink.Shortcode,
|
||||
)
|
||||
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user