MCPcopy Create free account
hub / github.com/Preloading/TwitterAPIBridge / GetOriginalURL

Function GetOriginalURL

db_controller/db_controller.go:466–473  ·  view source on GitHub ↗

GetOriginalURL retrieves the original URL from the database using the short code

(shortCode string)

Source from the content-addressed store, hash-verified

464
465// GetOriginalURL retrieves the original URL from the database using the short code
466func GetOriginalURL(shortCode string) (string, error) {
467 var shortLink ShortLink
468 if err := db.First(&shortLink, shortCode).Error; err != nil {
469 return "", err
470 }
471
472 return shortLink.OriginalURL, nil
473}

Callers 1

RedirectToLinkFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected