retract changes made in error handling in SubmitWeeklyReport handler
This commit is contained in:
		
							parent
							
								
									8d739396a1
								
							
						
					
					
						commit
						6ed53fe94a
					
				
					 1 changed files with 2 additions and 4 deletions
				
			
		|  | @ -33,13 +33,11 @@ func (gs *GState) SubmitWeeklyReport(c *fiber.Ctx) error { | |||
| 
 | ||||
| 	if err := gs.Db.AddWeeklyReport(report.ProjectName, username, report.Week, report.DevelopmentTime, report.MeetingTime, report.AdminTime, report.OwnWorkTime, report.StudyTime, report.TestingTime); err != nil { | ||||
| 		log.Info("Error adding weekly report to db:", err) | ||||
| 		//Previously:return c.Status(500).SendString(err.Error()) | ||||
| 		return c.Status(500).JSON(fiber.Map{"success": false, "message": err.Error()}) | ||||
| 		return c.Status(500).SendString(err.Error()) | ||||
| 	} | ||||
| 
 | ||||
| 	log.Info("Weekly report added") | ||||
| 	//Previosly: return c.Status(200).SendString("Time report added") | ||||
| 	return c.Status(200).JSON(fiber.Map{"success": true, "data": "Time report added"}) | ||||
| 	return c.Status(200).SendString("Time report added") | ||||
| } | ||||
| 
 | ||||
| // Handler for retrieving weekly report | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Davenludd
						Davenludd