diff --git a/Taskfile.yml b/Taskfile.yml index 88146c3..0b8049e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -23,7 +23,8 @@ tasks: python3 ./scripts/process-types.py ./frontend/lib/api/types/data-contracts.ts sources: - "./backend/app/api/**/*" - - "./backend/app/internal/types/**/*" + - "./backend/internal/repo/**/*" + - "./backend/internal/services/**/*" - "./scripts/process-types.py" generates: - "./frontend/lib/api/types/data-contracts.ts" diff --git a/backend/app/api/docs/docs.go b/backend/app/api/docs/docs.go index 156d845..784c591 100644 --- a/backend/app/api/docs/docs.go +++ b/backend/app/api/docs/docs.go @@ -1531,9 +1531,6 @@ const docTemplate = `{ "email": { "type": "string" }, - "groupName": { - "type": "string" - }, "name": { "type": "string" }, diff --git a/backend/app/api/docs/swagger.json b/backend/app/api/docs/swagger.json index cec1d74..2e6dea6 100644 --- a/backend/app/api/docs/swagger.json +++ b/backend/app/api/docs/swagger.json @@ -1523,9 +1523,6 @@ "email": { "type": "string" }, - "groupName": { - "type": "string" - }, "name": { "type": "string" }, diff --git a/backend/app/api/docs/swagger.yaml b/backend/app/api/docs/swagger.yaml index ea65a28..ae460a6 100644 --- a/backend/app/api/docs/swagger.yaml +++ b/backend/app/api/docs/swagger.yaml @@ -322,8 +322,6 @@ definitions: properties: email: type: string - groupName: - type: string name: type: string password: diff --git a/backend/internal/services/service_user.go b/backend/internal/services/service_user.go index 93008c8..688821a 100644 --- a/backend/internal/services/service_user.go +++ b/backend/internal/services/service_user.go @@ -28,7 +28,6 @@ type ( Name string `json:"name"` Email string `json:"email"` Password string `json:"password"` - GroupName string `json:"groupName"` } UserAuthTokenDetail struct { Raw string `json:"raw"` @@ -46,7 +45,6 @@ func (svc *UserService) RegisterUser(ctx context.Context, data UserRegistration) log.Debug(). Str("name", data.Name). Str("email", data.Email). - Str("groupName", data.GroupName). Str("groupToken", data.GroupToken). Msg("Registering new user") @@ -57,7 +55,7 @@ func (svc *UserService) RegisterUser(ctx context.Context, data UserRegistration) ) if data.GroupToken == "" { - group, err = svc.repos.Groups.GroupCreate(ctx, data.GroupName) + group, err = svc.repos.Groups.GroupCreate(ctx, "Home") if err != nil { log.Err(err).Msg("Failed to create group") return repo.UserOut{}, err diff --git a/frontend/lib/api/__test__/public.test.ts b/frontend/lib/api/__test__/public.test.ts index cb3a9c3..4b07165 100644 --- a/frontend/lib/api/__test__/public.test.ts +++ b/frontend/lib/api/__test__/public.test.ts @@ -8,7 +8,6 @@ function userFactory(): UserRegistration { email: faker.internet.email(), password: faker.internet.password(), name: faker.name.firstName(), - groupName: faker.animal.cat(), token: "", }; } diff --git a/frontend/lib/api/__test__/test-utils.ts b/frontend/lib/api/__test__/test-utils.ts index cab9b9a..2cef4a3 100644 --- a/frontend/lib/api/__test__/test-utils.ts +++ b/frontend/lib/api/__test__/test-utils.ts @@ -30,10 +30,10 @@ export async function sharedUserClient(): Promise { return userClient(cache.token); } const testUser = { - groupName: "test-group", email: "__test__@__test__.com", name: "__test__", password: "__test__", + token: "", }; const api = client(); diff --git a/frontend/lib/api/types/data-contracts.ts b/frontend/lib/api/types/data-contracts.ts index daa08a0..bd15e83 100644 --- a/frontend/lib/api/types/data-contracts.ts +++ b/frontend/lib/api/types/data-contracts.ts @@ -219,7 +219,6 @@ export interface ServerValidationError { export interface UserRegistration { email: string; - groupName: string; name: string; password: string; token: string; diff --git a/frontend/pages/index.vue b/frontend/pages/index.vue index 5194198..eab6f4e 100644 --- a/frontend/pages/index.vue +++ b/frontend/pages/index.vue @@ -21,7 +21,6 @@ const username = ref(""); const email = ref(""); - const groupName = ref(""); const password = ref(""); const canRegister = ref(false); @@ -50,7 +49,6 @@ name: username.value, email: email.value, password: password.value, - groupName: groupName.value, token: groupToken.value, }); @@ -152,8 +150,7 @@ - -
+

You're Joining an Existing Group!