Skip to content

Commit

Permalink
Refactor storage.go to remove unused GetFilePathForRoom function
Browse files Browse the repository at this point in the history
  • Loading branch information
abdealijaroli committed Oct 5, 2024
1 parent 09b7255 commit 63330c2
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions store/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,6 @@ func (s *PostgresStore) CreateShortURLTable() error {
return err
}

func (s *PostgresStore) GetFilePathForRoom(roomID string) (string, error) {
var filePath string
query := `SELECT original_url FROM accounts WHERE short_url = $1`
err := s.db.QueryRow(query, roomID).Scan(&filePath)
if err != nil {
return "", err
}
return filePath, nil
}

func (s *PostgresStore) AddShortURLToDB(originalURL string, shortURL string, isFileTransfer bool) error {
query := `INSERT INTO short_urls (original_url, short_url, is_file_transfer, created_at)
VALUES ($1, $2, $3, $4)
Expand Down

0 comments on commit 63330c2

Please sign in to comment.