Skip to content

The only tool you need to know what is happening and how to fix it.

fix: closes #58

dduxa81f44319cd3
diff --git a/backend/app/controllers/auth.controller.go b/backend/app/controllers/auth.controller.go
index f575e24b..a49cbcc8 100644
--- a/backend/app/controllers/auth.controller.go
+++ b/backend/app/controllers/auth.controller.go
@@ -125,7 +125,7 @@ func (a authController) Register(c *gin.Context) {
return
}
- org, err := repositories.OrganizationRepository.Create(tx, request.OrganizationName)
+ org, err := repositories.OrganizationRepository.Create(tx, request.OrganizationName, request.Timezone)
if err != nil {
c.AbortWithError(http.StatusInternalServerError, err)
return
diff --git a/backend/app/models/auth.model.go b/backend/app/models/auth.model.go
index 08cbb4ca..ec54ed1b 100644
--- a/backend/app/models/auth.model.go
+++ b/backend/app/models/auth.model.go
@@ -24,6 +24,7 @@ type RegisterRequest struct {
Name string `json:"name" binding:"required"`
Password string `json:"password" binding:"required,min=8"`
OrganizationName string `json:"organizationName" binding:"required"`
+ Timezone string `json:"timezone" binding:"required"`
ProjectName string `json:"projectName" binding:"required"`
Framework string `json:"framework" binding:"required"`
}
diff --git a/backend/app/repositories/organization.repository.go b/backend/app/repositories/organization.repository.go
index d2ab20c9..61a1b750 100644
--- a/backend/app/repositories/organization.repository.go
+++ b/backend/app/repositories/organization.repository.go
@@ -10,9 +10,10 @@ import (
type organizationRepository struct{}
-func (r *organizationRepository) Create(tx *sql.Tx, name string) (*models.Organization, error) {
+func (r *organizationRepository) Create(tx *sql.Tx, name string, timezone string) (*models.Organization, error) {
org := &models.Organization{
Name: name,
+ Timezone: timezone,
CreatedAt: time.Now().UTC(),
}