Skip to content

Commit fd2e014

Browse files
committed
feat: added audit and change history endpoints.
- /api/audit: to get all the audit logs - /api/audit/:audit_id: to get the audit by its id - /api/audit/:audit_id/changes: to get all the change log of a particular audit - /api/audit/:audit_id/changes/:id: to get change of a particular change log Signed-off-by: Kavya Shukla <[email protected]>
1 parent 721d8f1 commit fd2e014

File tree

5 files changed

+404
-22
lines changed

5 files changed

+404
-22
lines changed

cmd/laas/main.go

+8
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,16 @@ func main() {
4343
log.Fatalf("Failed to automigrate database: %v", err)
4444
}
4545

46+
if err := db.DB.AutoMigrate(&models.Audit{}); err != nil {
47+
log.Fatalf("Failed to automigrate database: %v", err)
48+
}
49+
50+
if err := db.DB.AutoMigrate(&models.ChangeLog{}); err != nil {
51+
log.Fatalf("Failed to automigrate database: %v", err)
52+
}
4653
db.Populatedb(*populatedb, *datafile)
4754

4855
r := api.Router()
56+
4957
r.Run()
5058
}

0 commit comments

Comments
 (0)