You've already forked factorio-server-manager
mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2026-06-19 20:06:55 +02:00
reformat
This commit is contained in:
+3
-3
@@ -44,14 +44,14 @@ func NewRouter() *mux.Router {
|
||||
apiRouter.Use(AuthMiddleware)
|
||||
|
||||
// use subrouter for calls, that run only, when server is turned off
|
||||
so := apiRouter.NewRoute().Subrouter()
|
||||
so.Use(ServerOffMiddleware)
|
||||
serverOffRouter := apiRouter.NewRoute().Subrouter()
|
||||
serverOffRouter.Use(ServerOffMiddleware)
|
||||
|
||||
apiRouter.NewRoute().Subrouter()
|
||||
for _, route := range apiRoutes {
|
||||
var router *mux.Router
|
||||
if route.ServerOff {
|
||||
router = so
|
||||
router = serverOffRouter
|
||||
} else {
|
||||
router = apiRouter
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ const CreateUserForm = ({updateUserList}) => {
|
||||
<form onSubmit={handleSubmit(onSubmit)}>
|
||||
<div className="mb-4">
|
||||
<Label htmlFor="username" text="Username"/>
|
||||
<Input register={register('username',{required: true})}
|
||||
<Input register={register('username', {required: true})}
|
||||
type="text"
|
||||
placeholder="Username"
|
||||
/>
|
||||
@@ -49,7 +49,7 @@ const CreateUserForm = ({updateUserList}) => {
|
||||
</div>
|
||||
<div className="mb-4">
|
||||
<Label htmlFor="email" text="Email"/>
|
||||
<Input register={register('email',{required: true})}
|
||||
<Input register={register('email', {required: true})}
|
||||
type="email"
|
||||
placeholder="Email"
|
||||
/>
|
||||
@@ -57,7 +57,7 @@ const CreateUserForm = ({updateUserList}) => {
|
||||
</div>
|
||||
<div className="mb-4">
|
||||
<Label htmlFor="password" text="Password"/>
|
||||
<Input register={register('password',{required: true})}
|
||||
<Input register={register('password', {required: true})}
|
||||
type="password"
|
||||
placeholder="Password"
|
||||
/>
|
||||
@@ -65,12 +65,16 @@ const CreateUserForm = ({updateUserList}) => {
|
||||
</div>
|
||||
<div className="mb-4">
|
||||
<Label htmlFor="password_confirmation" text="Password Confirmation"/>
|
||||
<Input register={register('password_confirmation',{required: true, validate: conformation => conformation === password})}
|
||||
<Input register={register('password_confirmation', {
|
||||
required: true,
|
||||
validate: conformation => conformation === password
|
||||
})}
|
||||
|
||||
type="password"
|
||||
placeholder="Password Confirmation"
|
||||
/>
|
||||
<Error error={errors.password_confirmation} message="Password Confirmation is required and must match the Password"/>
|
||||
<Error error={errors.password_confirmation}
|
||||
message="Password Confirmation is required and must match the Password"/>
|
||||
</div>
|
||||
<Button isSubmit={true} type="success">Save</Button>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user