package logic import ( "database/sql" "sevenkeys/database" "sevenkeys/delverlens" ) func ImportDelverLensCards(db *sql.DB, cards []delverlens.DelverLensCard, storageAreaId int) error { for _, card := range cards { var cardPrintingId string if card.IsFoil { cardPrintingId = card.ScryfallID + "n" } else { cardPrintingId = card.ScryfallID + "f" } cardLocation := database.CardLocation{ CardPrintingId: cardPrintingId, StorageAreaId: storageAreaId, } StoreCard(cardLocation) } }