edit: field Shortcode dan expire duration

This commit is contained in:
mario
2025-05-17 09:38:40 +07:00
parent ed3feb77d2
commit 3aa155dfbc
7 changed files with 56 additions and 19 deletions

View File

@@ -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 {