diff --git a/satellite/console/consoleweb/consoleql/mutation_test.go b/satellite/console/consoleweb/consoleql/mutation_test.go index 5c600d956..0e2fc0d37 100644 --- a/satellite/console/consoleweb/consoleql/mutation_test.go +++ b/satellite/console/consoleweb/consoleql/mutation_test.go @@ -286,7 +286,7 @@ func TestGrapqhlMutation(t *testing.T) { } query := fmt.Sprintf( - "mutation {createProject(input:{name:\"%s\",description:\"%s\",isTermsAccepted:true}){name,description,id,createdAt}}", + "mutation {createProject(input:{name:\"%s\",description:\"%s\"}){name,description,id,createdAt}}", projectInfo.Name, projectInfo.Description, ) diff --git a/satellite/console/consoleweb/consoleql/project.go b/satellite/console/consoleweb/consoleql/project.go index 740a4758a..74cb9a5a5 100644 --- a/satellite/console/consoleweb/consoleql/project.go +++ b/satellite/console/consoleweb/consoleql/project.go @@ -18,9 +18,6 @@ const ( FieldName = "name" // FieldDescription is a field name for description FieldDescription = "description" - // FieldIsTermsAccepted indicates if user accepted Terms & Conditions during project creation - // Used in input model - FieldIsTermsAccepted = "isTermsAccepted" // FieldMembers is field name for members FieldMembers = "members" // FieldAPIKeys is a field name for api keys @@ -50,9 +47,6 @@ func graphqlProject(service *console.Service, types Types) *graphql.Object { FieldDescription: &graphql.Field{ Type: graphql.String, }, - FieldIsTermsAccepted: &graphql.Field{ - Type: graphql.Int, - }, FieldCreatedAt: &graphql.Field{ Type: graphql.DateTime, }, @@ -131,9 +125,6 @@ func graphqlProjectInput() *graphql.InputObject { FieldDescription: &graphql.InputObjectFieldConfig{ Type: graphql.String, }, - FieldIsTermsAccepted: &graphql.InputObjectFieldConfig{ - Type: graphql.Boolean, - }, }, }) } @@ -142,7 +133,6 @@ func graphqlProjectInput() *graphql.InputObject { func fromMapProjectInfo(args map[string]interface{}) (project console.ProjectInfo) { project.Name, _ = args[FieldName].(string) project.Description, _ = args[FieldDescription].(string) - project.IsTermsAccepted, _ = args[FieldIsTermsAccepted].(bool) return } diff --git a/satellite/console/consoleweb/consoleql/query_test.go b/satellite/console/consoleweb/consoleql/query_test.go index 2e02931f3..349f8ea0f 100644 --- a/satellite/console/consoleweb/consoleql/query_test.go +++ b/satellite/console/consoleweb/consoleql/query_test.go @@ -138,8 +138,7 @@ func TestGraphqlQuery(t *testing.T) { }) createdProject, err := service.CreateProject(authCtx, console.ProjectInfo{ - Name: "TestProject", - IsTermsAccepted: true, + Name: "TestProject", }) if err != nil { @@ -311,9 +310,8 @@ func TestGraphqlQuery(t *testing.T) { }) project2, err := service.CreateProject(authCtx, console.ProjectInfo{ - Name: "Project2", - Description: "Test desc", - IsTermsAccepted: true, + Name: "Project2", + Description: "Test desc", }) if err != nil { diff --git a/satellite/console/projects.go b/satellite/console/projects.go index a52ee30f9..5dd44bf7d 100644 --- a/satellite/console/projects.go +++ b/satellite/console/projects.go @@ -32,8 +32,6 @@ type Project struct { Name string `json:"name"` Description string `json:"description"` - // stores last accepted version of terms of use. - TermsAccepted int `json:"termsAccepted"` CreatedAt time.Time `json:"createdAt"` } @@ -42,8 +40,6 @@ type Project struct { type ProjectInfo struct { Name string `json:"name"` Description string `json:"description"` - // Indicates if user accepted Terms & Conditions during project creation on UI - IsTermsAccepted bool `json:"isTermsAccepted"` CreatedAt time.Time `json:"createdAt"` } diff --git a/satellite/console/service.go b/satellite/console/service.go index d4f44c521..773af0b0f 100644 --- a/satellite/console/service.go +++ b/satellite/console/service.go @@ -215,14 +215,9 @@ func (s *Service) CreateProject(ctx context.Context, projectInfo ProjectInfo) (p return nil, err } - if !projectInfo.IsTermsAccepted { - return nil, errs.New("terms of use should be accepted!") - } - project := &Project{ - Description: projectInfo.Description, - Name: projectInfo.Name, - TermsAccepted: 1, //TODO: get lat version of Term of Use + Description: projectInfo.Description, + Name: projectInfo.Name, } transaction, err := s.store.BeginTx(ctx) diff --git a/satellite/satellitedb/apikeys_test.go b/satellite/satellitedb/apikeys_test.go index da6874f29..f2bee9f6f 100644 --- a/satellite/satellitedb/apikeys_test.go +++ b/satellite/satellitedb/apikeys_test.go @@ -34,9 +34,8 @@ func TestApiKeysRepository(t *testing.T) { apikeys := db.APIKeys() project, err := projects.Insert(ctx, &console.Project{ - Name: "ProjectName", - TermsAccepted: 1, - Description: "projects description", + Name: "ProjectName", + Description: "projects description", }) assert.NotNil(t, project) assert.NoError(t, err) diff --git a/satellite/satellitedb/dbx/satellitedb.dbx b/satellite/satellitedb/dbx/satellitedb.dbx index eda67ebff..223011faa 100644 --- a/satellite/satellitedb/dbx/satellitedb.dbx +++ b/satellite/satellitedb/dbx/satellitedb.dbx @@ -272,8 +272,6 @@ model project ( field name text field description text ( updatable ) - // stores last accepted version of terms of use - field terms_accepted int ( updatable ) field created_at timestamp ( autoinsert ) ) diff --git a/satellite/satellitedb/dbx/satellitedb.dbx.go b/satellite/satellitedb/dbx/satellitedb.dbx.go index 65e0f5cf0..b82fec7e3 100644 --- a/satellite/satellitedb/dbx/satellitedb.dbx.go +++ b/satellite/satellitedb/dbx/satellitedb.dbx.go @@ -356,7 +356,6 @@ CREATE TABLE projects ( id bytea NOT NULL, name text NOT NULL, description text NOT NULL, - terms_accepted integer NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY ( id ) ); @@ -538,7 +537,6 @@ CREATE TABLE projects ( id BLOB NOT NULL, name TEXT NOT NULL, description TEXT NOT NULL, - terms_accepted INTEGER NOT NULL, created_at TIMESTAMP NOT NULL, PRIMARY KEY ( id ) ); @@ -1785,18 +1783,16 @@ func (f OverlayCacheNode_UptimeSuccessCount_Field) value() interface{} { func (OverlayCacheNode_UptimeSuccessCount_Field) _Column() string { return "uptime_success_count" } type Project struct { - Id []byte - Name string - Description string - TermsAccepted int - CreatedAt time.Time + Id []byte + Name string + Description string + CreatedAt time.Time } func (Project) _Table() string { return "projects" } type Project_Update_Fields struct { - Description Project_Description_Field - TermsAccepted Project_TermsAccepted_Field + Description Project_Description_Field } type Project_Id_Field struct { @@ -1856,25 +1852,6 @@ func (f Project_Description_Field) value() interface{} { func (Project_Description_Field) _Column() string { return "description" } -type Project_TermsAccepted_Field struct { - _set bool - _null bool - _value int -} - -func Project_TermsAccepted(v int) Project_TermsAccepted_Field { - return Project_TermsAccepted_Field{_set: true, _value: v} -} - -func (f Project_TermsAccepted_Field) value() interface{} { - if !f._set || f._null { - return nil - } - return f._value -} - -func (Project_TermsAccepted_Field) _Column() string { return "terms_accepted" } - type Project_CreatedAt_Field struct { _set bool _null bool @@ -2735,24 +2712,22 @@ func (obj *postgresImpl) Create_User(ctx context.Context, func (obj *postgresImpl) Create_Project(ctx context.Context, project_id Project_Id_Field, project_name Project_Name_Field, - project_description Project_Description_Field, - project_terms_accepted Project_TermsAccepted_Field) ( + project_description Project_Description_Field) ( project *Project, err error) { __now := obj.db.Hooks.Now().UTC() __id_val := project_id.value() __name_val := project_name.value() __description_val := project_description.value() - __terms_accepted_val := project_terms_accepted.value() __created_at_val := __now - var __embed_stmt = __sqlbundle_Literal("INSERT INTO projects ( id, name, description, terms_accepted, created_at ) VALUES ( ?, ?, ?, ?, ? ) RETURNING projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at") + var __embed_stmt = __sqlbundle_Literal("INSERT INTO projects ( id, name, description, created_at ) VALUES ( ?, ?, ?, ? ) RETURNING projects.id, projects.name, projects.description, projects.created_at") var __stmt = __sqlbundle_Render(obj.dialect, __embed_stmt) - obj.logStmt(__stmt, __id_val, __name_val, __description_val, __terms_accepted_val, __created_at_val) + obj.logStmt(__stmt, __id_val, __name_val, __description_val, __created_at_val) project = &Project{} - err = obj.driver.QueryRow(__stmt, __id_val, __name_val, __description_val, __terms_accepted_val, __created_at_val).Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = obj.driver.QueryRow(__stmt, __id_val, __name_val, __description_val, __created_at_val).Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err != nil { return nil, obj.makeErr(err) } @@ -3421,7 +3396,7 @@ func (obj *postgresImpl) Get_User_By_Id(ctx context.Context, func (obj *postgresImpl) All_Project(ctx context.Context) ( rows []*Project, err error) { - var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at FROM projects") + var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.created_at FROM projects") var __values []interface{} __values = append(__values) @@ -3437,7 +3412,7 @@ func (obj *postgresImpl) All_Project(ctx context.Context) ( for __rows.Next() { project := &Project{} - err = __rows.Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = __rows.Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err != nil { return nil, obj.makeErr(err) } @@ -3454,7 +3429,7 @@ func (obj *postgresImpl) Get_Project_By_Id(ctx context.Context, project_id Project_Id_Field) ( project *Project, err error) { - var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at FROM projects WHERE projects.id = ?") + var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.created_at FROM projects WHERE projects.id = ?") var __values []interface{} __values = append(__values, project_id.value()) @@ -3463,7 +3438,7 @@ func (obj *postgresImpl) Get_Project_By_Id(ctx context.Context, obj.logStmt(__stmt, __values...) project = &Project{} - err = obj.driver.QueryRow(__stmt, __values...).Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = obj.driver.QueryRow(__stmt, __values...).Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err != nil { return nil, obj.makeErr(err) } @@ -3475,7 +3450,7 @@ func (obj *postgresImpl) All_Project_By_ProjectMember_MemberId_OrderBy_Asc_Proje project_member_member_id ProjectMember_MemberId_Field) ( rows []*Project, err error) { - var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at FROM projects JOIN project_members ON projects.id = project_members.project_id WHERE project_members.member_id = ? ORDER BY projects.name") + var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.created_at FROM projects JOIN project_members ON projects.id = project_members.project_id WHERE project_members.member_id = ? ORDER BY projects.name") var __values []interface{} __values = append(__values, project_member_member_id.value()) @@ -3491,7 +3466,7 @@ func (obj *postgresImpl) All_Project_By_ProjectMember_MemberId_OrderBy_Asc_Proje for __rows.Next() { project := &Project{} - err = __rows.Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = __rows.Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err != nil { return nil, obj.makeErr(err) } @@ -4024,7 +3999,7 @@ func (obj *postgresImpl) Update_Project_By_Id(ctx context.Context, project *Project, err error) { var __sets = &__sqlbundle_Hole{} - var __embed_stmt = __sqlbundle_Literals{Join: "", SQLs: []__sqlbundle_SQL{__sqlbundle_Literal("UPDATE projects SET "), __sets, __sqlbundle_Literal(" WHERE projects.id = ? RETURNING projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at")}} + var __embed_stmt = __sqlbundle_Literals{Join: "", SQLs: []__sqlbundle_SQL{__sqlbundle_Literal("UPDATE projects SET "), __sets, __sqlbundle_Literal(" WHERE projects.id = ? RETURNING projects.id, projects.name, projects.description, projects.created_at")}} __sets_sql := __sqlbundle_Literals{Join: ", "} var __values []interface{} @@ -4035,11 +4010,6 @@ func (obj *postgresImpl) Update_Project_By_Id(ctx context.Context, __sets_sql.SQLs = append(__sets_sql.SQLs, __sqlbundle_Literal("description = ?")) } - if update.TermsAccepted._set { - __values = append(__values, update.TermsAccepted.value()) - __sets_sql.SQLs = append(__sets_sql.SQLs, __sqlbundle_Literal("terms_accepted = ?")) - } - if len(__sets_sql.SQLs) == 0 { return nil, emptyUpdate() } @@ -4053,7 +4023,7 @@ func (obj *postgresImpl) Update_Project_By_Id(ctx context.Context, obj.logStmt(__stmt, __values...) project = &Project{} - err = obj.driver.QueryRow(__stmt, __values...).Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = obj.driver.QueryRow(__stmt, __values...).Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err == sql.ErrNoRows { return nil, nil } @@ -4888,23 +4858,21 @@ func (obj *sqlite3Impl) Create_User(ctx context.Context, func (obj *sqlite3Impl) Create_Project(ctx context.Context, project_id Project_Id_Field, project_name Project_Name_Field, - project_description Project_Description_Field, - project_terms_accepted Project_TermsAccepted_Field) ( + project_description Project_Description_Field) ( project *Project, err error) { __now := obj.db.Hooks.Now().UTC() __id_val := project_id.value() __name_val := project_name.value() __description_val := project_description.value() - __terms_accepted_val := project_terms_accepted.value() __created_at_val := __now - var __embed_stmt = __sqlbundle_Literal("INSERT INTO projects ( id, name, description, terms_accepted, created_at ) VALUES ( ?, ?, ?, ?, ? )") + var __embed_stmt = __sqlbundle_Literal("INSERT INTO projects ( id, name, description, created_at ) VALUES ( ?, ?, ?, ? )") var __stmt = __sqlbundle_Render(obj.dialect, __embed_stmt) - obj.logStmt(__stmt, __id_val, __name_val, __description_val, __terms_accepted_val, __created_at_val) + obj.logStmt(__stmt, __id_val, __name_val, __description_val, __created_at_val) - __res, err := obj.driver.Exec(__stmt, __id_val, __name_val, __description_val, __terms_accepted_val, __created_at_val) + __res, err := obj.driver.Exec(__stmt, __id_val, __name_val, __description_val, __created_at_val) if err != nil { return nil, obj.makeErr(err) } @@ -5586,7 +5554,7 @@ func (obj *sqlite3Impl) Get_User_By_Id(ctx context.Context, func (obj *sqlite3Impl) All_Project(ctx context.Context) ( rows []*Project, err error) { - var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at FROM projects") + var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.created_at FROM projects") var __values []interface{} __values = append(__values) @@ -5602,7 +5570,7 @@ func (obj *sqlite3Impl) All_Project(ctx context.Context) ( for __rows.Next() { project := &Project{} - err = __rows.Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = __rows.Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err != nil { return nil, obj.makeErr(err) } @@ -5619,7 +5587,7 @@ func (obj *sqlite3Impl) Get_Project_By_Id(ctx context.Context, project_id Project_Id_Field) ( project *Project, err error) { - var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at FROM projects WHERE projects.id = ?") + var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.created_at FROM projects WHERE projects.id = ?") var __values []interface{} __values = append(__values, project_id.value()) @@ -5628,7 +5596,7 @@ func (obj *sqlite3Impl) Get_Project_By_Id(ctx context.Context, obj.logStmt(__stmt, __values...) project = &Project{} - err = obj.driver.QueryRow(__stmt, __values...).Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = obj.driver.QueryRow(__stmt, __values...).Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err != nil { return nil, obj.makeErr(err) } @@ -5640,7 +5608,7 @@ func (obj *sqlite3Impl) All_Project_By_ProjectMember_MemberId_OrderBy_Asc_Projec project_member_member_id ProjectMember_MemberId_Field) ( rows []*Project, err error) { - var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at FROM projects JOIN project_members ON projects.id = project_members.project_id WHERE project_members.member_id = ? ORDER BY projects.name") + var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.created_at FROM projects JOIN project_members ON projects.id = project_members.project_id WHERE project_members.member_id = ? ORDER BY projects.name") var __values []interface{} __values = append(__values, project_member_member_id.value()) @@ -5656,7 +5624,7 @@ func (obj *sqlite3Impl) All_Project_By_ProjectMember_MemberId_OrderBy_Asc_Projec for __rows.Next() { project := &Project{} - err = __rows.Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = __rows.Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err != nil { return nil, obj.makeErr(err) } @@ -6250,11 +6218,6 @@ func (obj *sqlite3Impl) Update_Project_By_Id(ctx context.Context, __sets_sql.SQLs = append(__sets_sql.SQLs, __sqlbundle_Literal("description = ?")) } - if update.TermsAccepted._set { - __values = append(__values, update.TermsAccepted.value()) - __sets_sql.SQLs = append(__sets_sql.SQLs, __sqlbundle_Literal("terms_accepted = ?")) - } - if len(__sets_sql.SQLs) == 0 { return nil, emptyUpdate() } @@ -6273,12 +6236,12 @@ func (obj *sqlite3Impl) Update_Project_By_Id(ctx context.Context, return nil, obj.makeErr(err) } - var __embed_stmt_get = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at FROM projects WHERE projects.id = ?") + var __embed_stmt_get = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.created_at FROM projects WHERE projects.id = ?") var __stmt_get = __sqlbundle_Render(obj.dialect, __embed_stmt_get) obj.logStmt("(IMPLIED) "+__stmt_get, __args...) - err = obj.driver.QueryRow(__stmt_get, __args...).Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = obj.driver.QueryRow(__stmt_get, __args...).Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err == sql.ErrNoRows { return nil, nil } @@ -6843,13 +6806,13 @@ func (obj *sqlite3Impl) getLastProject(ctx context.Context, pk int64) ( project *Project, err error) { - var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.terms_accepted, projects.created_at FROM projects WHERE _rowid_ = ?") + var __embed_stmt = __sqlbundle_Literal("SELECT projects.id, projects.name, projects.description, projects.created_at FROM projects WHERE _rowid_ = ?") var __stmt = __sqlbundle_Render(obj.dialect, __embed_stmt) obj.logStmt(__stmt, pk) project = &Project{} - err = obj.driver.QueryRow(__stmt, pk).Scan(&project.Id, &project.Name, &project.Description, &project.TermsAccepted, &project.CreatedAt) + err = obj.driver.QueryRow(__stmt, pk).Scan(&project.Id, &project.Name, &project.Description, &project.CreatedAt) if err != nil { return nil, obj.makeErr(err) } @@ -7378,14 +7341,13 @@ func (rx *Rx) Create_OverlayCacheNode(ctx context.Context, func (rx *Rx) Create_Project(ctx context.Context, project_id Project_Id_Field, project_name Project_Name_Field, - project_description Project_Description_Field, - project_terms_accepted Project_TermsAccepted_Field) ( + project_description Project_Description_Field) ( project *Project, err error) { var tx *Tx if tx, err = rx.getTx(ctx); err != nil { return } - return tx.Create_Project(ctx, project_id, project_name, project_description, project_terms_accepted) + return tx.Create_Project(ctx, project_id, project_name, project_description) } @@ -7947,8 +7909,7 @@ type Methods interface { Create_Project(ctx context.Context, project_id Project_Id_Field, project_name Project_Name_Field, - project_description Project_Description_Field, - project_terms_accepted Project_TermsAccepted_Field) ( + project_description Project_Description_Field) ( project *Project, err error) Create_ProjectMember(ctx context.Context, diff --git a/satellite/satellitedb/dbx/satellitedb.dbx.postgres.sql b/satellite/satellitedb/dbx/satellitedb.dbx.postgres.sql index 8fcab9e7e..cacfe986d 100644 --- a/satellite/satellitedb/dbx/satellitedb.dbx.postgres.sql +++ b/satellite/satellitedb/dbx/satellitedb.dbx.postgres.sql @@ -83,7 +83,6 @@ CREATE TABLE projects ( id bytea NOT NULL, name text NOT NULL, description text NOT NULL, - terms_accepted integer NOT NULL, created_at timestamp with time zone NOT NULL, PRIMARY KEY ( id ) ); diff --git a/satellite/satellitedb/dbx/satellitedb.dbx.sqlite3.sql b/satellite/satellitedb/dbx/satellitedb.dbx.sqlite3.sql index 5bf39279a..45675cae5 100644 --- a/satellite/satellitedb/dbx/satellitedb.dbx.sqlite3.sql +++ b/satellite/satellitedb/dbx/satellitedb.dbx.sqlite3.sql @@ -83,7 +83,6 @@ CREATE TABLE projects ( id BLOB NOT NULL, name TEXT NOT NULL, description TEXT NOT NULL, - terms_accepted INTEGER NOT NULL, created_at TIMESTAMP NOT NULL, PRIMARY KEY ( id ) ); diff --git a/satellite/satellitedb/projectmembers_test.go b/satellite/satellitedb/projectmembers_test.go index 583c765c6..7ff1eabc3 100644 --- a/satellite/satellitedb/projectmembers_test.go +++ b/satellite/satellitedb/projectmembers_test.go @@ -207,14 +207,12 @@ func prepareUsersAndProjects(ctx context.Context, t *testing.T, users console.Us projectList := []*console.Project{ { - Name: "projName1", - TermsAccepted: 1, - Description: "Test project 1", + Name: "projName1", + Description: "Test project 1", }, { - Name: "projName2", - TermsAccepted: 1, - Description: "Test project 1", + Name: "projName2", + Description: "Test project 1", }, } diff --git a/satellite/satellitedb/projects.go b/satellite/satellitedb/projects.go index d1e4a5901..cdb627efd 100644 --- a/satellite/satellitedb/projects.go +++ b/satellite/satellitedb/projects.go @@ -59,8 +59,7 @@ func (projects *projects) Insert(ctx context.Context, project *console.Project) createdProject, err := projects.db.Create_Project(ctx, dbx.Project_Id(projectID[:]), dbx.Project_Name(project.Name), - dbx.Project_Description(project.Description), - dbx.Project_TermsAccepted(project.TermsAccepted)) + dbx.Project_Description(project.Description)) if err != nil { return nil, err @@ -79,8 +78,7 @@ func (projects *projects) Delete(ctx context.Context, id uuid.UUID) error { // Update is a method for updating project entity func (projects *projects) Update(ctx context.Context, project *console.Project) error { updateFields := dbx.Project_Update_Fields{ - Description: dbx.Project_Description(project.Description), - TermsAccepted: dbx.Project_TermsAccepted(project.TermsAccepted), + Description: dbx.Project_Description(project.Description), } _, err := projects.db.Update_Project_By_Id(ctx, @@ -102,11 +100,10 @@ func projectFromDBX(project *dbx.Project) (*console.Project, error) { } u := &console.Project{ - ID: id, - Name: project.Name, - Description: project.Description, - TermsAccepted: project.TermsAccepted, - CreatedAt: project.CreatedAt, + ID: id, + Name: project.Name, + Description: project.Description, + CreatedAt: project.CreatedAt, } return u, nil diff --git a/satellite/satellitedb/projects_test.go b/satellite/satellitedb/projects_test.go index bb1492f43..a88142741 100644 --- a/satellite/satellitedb/projects_test.go +++ b/satellite/satellitedb/projects_test.go @@ -64,9 +64,8 @@ func TestProjectsRepository(t *testing.T) { assert.NotNil(t, owner) project = &console.Project{ - Name: name, - Description: description, - TermsAccepted: 1, + Name: name, + Description: description, } project, err = projects.Insert(ctx, project) @@ -80,7 +79,6 @@ func TestProjectsRepository(t *testing.T) { assert.Equal(t, projectByID.ID, project.ID) assert.Equal(t, projectByID.Name, name) assert.Equal(t, projectByID.Description, description) - assert.Equal(t, projectByID.TermsAccepted, 1) }) t.Run("Get by projectID success", func(t *testing.T) { @@ -89,7 +87,6 @@ func TestProjectsRepository(t *testing.T) { assert.Equal(t, projectByID.ID, project.ID) assert.Equal(t, projectByID.Name, name) assert.Equal(t, projectByID.Description, description) - assert.Equal(t, projectByID.TermsAccepted, 1) }) t.Run("Update project success", func(t *testing.T) { @@ -99,9 +96,8 @@ func TestProjectsRepository(t *testing.T) { // creating new project with updated values newProject := &console.Project{ - ID: oldProject.ID, - Description: newDescription, - TermsAccepted: 2, + ID: oldProject.ID, + Description: newDescription, } err = projects.Update(ctx, newProject) @@ -112,7 +108,6 @@ func TestProjectsRepository(t *testing.T) { assert.NoError(t, err) assert.Equal(t, newProject.ID, oldProject.ID) assert.Equal(t, newProject.Description, newDescription) - assert.Equal(t, newProject.TermsAccepted, 2) }) t.Run("Delete project success", func(t *testing.T) { @@ -133,9 +128,8 @@ func TestProjectsRepository(t *testing.T) { assert.Equal(t, len(allProjects), 0) newProject := &console.Project{ - Description: description, - Name: name, - TermsAccepted: 1, + Description: description, + Name: name, } _, err = projects.Insert(ctx, newProject) @@ -146,9 +140,8 @@ func TestProjectsRepository(t *testing.T) { assert.Equal(t, len(allProjects), 1) newProject2 := &console.Project{ - Description: description, - Name: name, - TermsAccepted: 1, + Description: description, + Name: name, } _, err = projects.Insert(ctx, newProject2) diff --git a/web/satellite/src/api/projects.ts b/web/satellite/src/api/projects.ts index aab78c41f..31fceac33 100644 --- a/web/satellite/src/api/projects.ts +++ b/web/satellite/src/api/projects.ts @@ -21,7 +21,6 @@ export async function createProjectRequest(project: Project): Promise -
- -

I agree to the Storj Bridge Hosting Terms & Conditions

-