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