fix: frontend bugs relating to redirects/tenants (#25)

* fix: frontend bugs

- Adds a query param `tenant` to application routes
- Allows setting an environment variable `SERVER_AUTH_SET_EMAIL_VERIFIED` to true which automatically sets the email to verified for new signups, since most local installations won't have an email verification mechanism
- When a user is logged in, navigating to `/auth/login` or `/auth/register` will redirect to the application via the no-auth.tsx middleware
- When there are no events found, the backend will no longer respond with a `500`-level error, and will return 0 rows instead
This commit is contained in:
abelanger5
2023-12-26 09:11:53 -05:00
committed by GitHub
parent e857004b79
commit ce61eade4f
20 changed files with 285 additions and 110 deletions
+1 -1
View File
@@ -43,7 +43,7 @@ func (u *UserService) UserCreate(ctx echo.Context, request gen.UserCreateRequest
createOpts := &repository.CreateUserOpts{
Email: string(request.Body.Email),
EmailVerified: repository.BoolPtr(false),
EmailVerified: repository.BoolPtr(u.config.Auth.SetEmailVerified),
Name: repository.StringPtr(request.Body.Name),
Password: *hashedPw,
}