mirror of
				https://github.com/optim-enterprises-bv/databunker.git
				synced 2025-10-30 17:37:50 +00:00 
			
		
		
		
	refactor audit code
This commit is contained in:
		| @@ -53,6 +53,12 @@ func (event auditEvent) submit(db dbcon) { | ||||
| 	if len(event.Who) > 0 { | ||||
| 		bdoc["who"] = event.Who | ||||
| 	} | ||||
| 	if len(event.Mode) > 0 { | ||||
| 		bdoc["mode"] = event.Mode | ||||
| 	} | ||||
| 	if len(event.Identity) > 0 { | ||||
| 		bdoc["identity"] = event.Identity | ||||
| 	} | ||||
| 	if len(event.Record) > 0 { | ||||
| 		bdoc["record"] = event.Record | ||||
| 	} | ||||
|   | ||||
| @@ -746,8 +746,10 @@ func initAudit(db *sql.DB) error { | ||||
| 	defer tx.Rollback() | ||||
| 	_, err = tx.Exec(` | ||||
| 	CREATE TABLE IF NOT EXISTS audit ( | ||||
| 	  identity STRING, | ||||
| 	  record STRING, | ||||
| 	  who STRING, | ||||
| 	  mode STRING, | ||||
| 	  app STRING, | ||||
| 	  title STRING, | ||||
| 	  status STRING, | ||||
|   | ||||
| @@ -86,7 +86,9 @@ | ||||
|           <thead> | ||||
|             <tr> | ||||
|               <th scope="col" data-field="when" data-formatter="dateFormat">when</th> | ||||
|               <th scope="col" data-field="who">Who</th> | ||||
|               <th scope="col" data-field="itentity">Identity</th> | ||||
|               <th scope="col" data-field="who">Target</th> | ||||
|               <th scope="col" data-field="mode">Mode</th> | ||||
|               <th scope="col" data-field="app">App</th> | ||||
|               <th scope="col" data-field="title">Title</th> | ||||
|               <th scope="col" data-field="status">Status</th> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 stremovsky
					stremovsky