Conditions | 1 |
Total Lines | 14 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package queries |
||
21 | func CreateUserLog(user models.User, log models.Logs) models.ResponseHTTP { |
||
22 | db := database.DBConn // DB Conn |
||
23 | |||
24 | userLog := models.UserLogs{ |
||
25 | UserID: user.ID, |
||
26 | LogID: log.ID, |
||
27 | } |
||
28 | |||
29 | db.Preload("User").Preload("Card").Create(userLog) |
||
30 | return models.ResponseHTTP{ |
||
31 | Success: true, |
||
32 | Message: "Created a new user log entry", |
||
33 | Data: userLog, |
||
34 | Count: 1, |
||
35 | } |
||
54 |