fix(server): rename config -> env
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -17,7 +17,11 @@ type AuthResponse struct {
|
||||
User *User `json:"user"`
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
type DeleteUserInput struct {
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
type Env struct {
|
||||
AdminSecret *string `json:"ADMIN_SECRET"`
|
||||
DatabaseType *string `json:"DATABASE_TYPE"`
|
||||
DatabaseURL *string `json:"DATABASE_URL"`
|
||||
@@ -53,10 +57,6 @@ type Config struct {
|
||||
OrganizationLogo *string `json:"ORGANIZATION_LOGO"`
|
||||
}
|
||||
|
||||
type DeleteUserInput struct {
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
type Error struct {
|
||||
Message string `json:"message"`
|
||||
Reason string `json:"reason"`
|
||||
@@ -117,8 +117,9 @@ type SignUpInput struct {
|
||||
Roles []string `json:"roles"`
|
||||
}
|
||||
|
||||
type UpdateConfigInput struct {
|
||||
type UpdateEnvInput struct {
|
||||
AdminSecret *string `json:"ADMIN_SECRET"`
|
||||
ConfirmAdminSecret *string `json:"CONFIRM_ADMIN_SECRET"`
|
||||
DatabaseType *string `json:"DATABASE_TYPE"`
|
||||
DatabaseURL *string `json:"DATABASE_URL"`
|
||||
DatabaseName *string `json:"DATABASE_NAME"`
|
||||
|
@@ -62,7 +62,7 @@ type Response {
|
||||
message: String!
|
||||
}
|
||||
|
||||
type Config {
|
||||
type Env {
|
||||
ADMIN_SECRET: String
|
||||
DATABASE_TYPE: String
|
||||
DATABASE_URL: String
|
||||
@@ -98,8 +98,9 @@ type Config {
|
||||
ORGANIZATION_LOGO: String
|
||||
}
|
||||
|
||||
input UpdateConfigInput {
|
||||
input UpdateEnvInput {
|
||||
ADMIN_SECRET: String
|
||||
CONFIRM_ADMIN_SECRET: String
|
||||
DATABASE_TYPE: String
|
||||
DATABASE_URL: String
|
||||
DATABASE_NAME: String
|
||||
@@ -236,7 +237,7 @@ type Mutation {
|
||||
_admin_signup(params: AdminSignupInput!): Response!
|
||||
_admin_login(params: AdminLoginInput!): Response!
|
||||
_admin_logout: Response!
|
||||
_update_config(params: UpdateConfigInput!): Response!
|
||||
_update_env(params: UpdateEnvInput!): Response!
|
||||
}
|
||||
|
||||
type Query {
|
||||
@@ -247,5 +248,5 @@ type Query {
|
||||
_users: [User!]!
|
||||
_verification_requests: [VerificationRequest!]!
|
||||
_admin_session: Response!
|
||||
_config: Config!
|
||||
_env: Env!
|
||||
}
|
||||
|
@@ -67,8 +67,8 @@ func (r *mutationResolver) AdminLogout(ctx context.Context) (*model.Response, er
|
||||
return resolvers.AdminLogoutResolver(ctx)
|
||||
}
|
||||
|
||||
func (r *mutationResolver) UpdateConfig(ctx context.Context, params model.UpdateConfigInput) (*model.Response, error) {
|
||||
return resolvers.UpdateConfigResolver(ctx, params)
|
||||
func (r *mutationResolver) UpdateEnv(ctx context.Context, params model.UpdateEnvInput) (*model.Response, error) {
|
||||
return resolvers.UpdateEnvResolver(ctx, params)
|
||||
}
|
||||
|
||||
func (r *queryResolver) Meta(ctx context.Context) (*model.Meta, error) {
|
||||
@@ -95,8 +95,8 @@ func (r *queryResolver) AdminSession(ctx context.Context) (*model.Response, erro
|
||||
return resolvers.AdminSessionResolver(ctx)
|
||||
}
|
||||
|
||||
func (r *queryResolver) Config(ctx context.Context) (*model.Config, error) {
|
||||
return resolvers.ConfigResolver(ctx)
|
||||
func (r *queryResolver) Env(ctx context.Context) (*model.Env, error) {
|
||||
return resolvers.EnvResolver(ctx)
|
||||
}
|
||||
|
||||
// Mutation returns generated.MutationResolver implementation.
|
||||
|
Reference in New Issue
Block a user