Conditions | 1 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package queries |
||
38 | func CreateDeckLog(deck models.Deck, log models.Logs) models.ResponseHTTP { |
||
39 | db := database.DBConn // DB Conn |
||
40 | |||
41 | deckLog := models.DeckLogs{ |
||
42 | DeckID: deck.ID, |
||
43 | LogID: log.ID, |
||
44 | } |
||
45 | |||
46 | db.Preload("User").Preload("Card").Create(deckLog) |
||
47 | return models.ResponseHTTP{ |
||
48 | Success: true, |
||
49 | Message: "Created a deck user log entry", |
||
50 | Data: deckLog, |
||
51 | Count: 1, |
||
52 | } |
||
54 |