mirror of
				https://github.com/linux-do/new-api.git
				synced 2025-11-04 13:23:42 +08:00 
			
		
		
		
	add log db
This commit is contained in:
		
							
								
								
									
										5
									
								
								main.go
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								main.go
									
									
									
									
									
								
							@@ -42,6 +42,11 @@ func main() {
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		common.FatalLog("failed to initialize database: " + err.Error())
 | 
			
		||||
	}
 | 
			
		||||
	// Initialize SQL Database
 | 
			
		||||
	err = model.InitLogDB()
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		common.FatalLog("failed to initialize database: " + err.Error())
 | 
			
		||||
	}
 | 
			
		||||
	defer func() {
 | 
			
		||||
		err := model.CloseDB()
 | 
			
		||||
		if err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user