Skip to content

Commit

Permalink
chore: Update service extra fields to use dynamic keys
Browse files Browse the repository at this point in the history
  • Loading branch information
andrasbacsai committed Oct 11, 2024
1 parent 35834ea commit 0714fc0
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions app/Models/Service.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public function extraFields()
if ($password) {
$data = $data->merge([
'Password' => [
'key' => 'LABEL_STUDIO_PASSWORD',
'key' => data_get($password, 'key'),
'value' => data_get($password, 'value'),
'rules' => 'required',
'isPassword' => true,
Expand Down Expand Up @@ -359,7 +359,7 @@ public function extraFields()
if ($email) {
$data = $data->merge([
'Admin Email' => [
'key' => 'LANGFUSE_INIT_USER_EMAIL',
'key' => data_get($email, 'key'),
'value' => data_get($email, 'value'),
'rules' => 'required|email',
],
Expand All @@ -370,7 +370,7 @@ public function extraFields()
if ($password) {
$data = $data->merge([
'Admin Password' => [
'key' => 'LANGFUSE_INIT_USER_PASSWORD',
'key' => data_get($password, 'key'),
'value' => data_get($password, 'value'),
'rules' => 'required',
'isPassword' => true,
Expand Down Expand Up @@ -487,7 +487,7 @@ public function extraFields()
if ($admin_password) {
$data = $data->merge([
'Admin Password' => [
'key' => 'SERVICE_PASSWORD_TOLGEE',
'key' => data_get($admin_password, 'key'),
'value' => data_get($admin_password, 'value'),
'rules' => 'required',
'isPassword' => true,
Expand Down Expand Up @@ -534,7 +534,7 @@ public function extraFields()
if ($admin_password) {
$data = $data->merge([
'Admin Password' => [
'key' => 'SERVICE_PASSWORD_UNLEASH',
'key' => data_get($admin_password, 'key'),
'value' => data_get($admin_password, 'value'),
'rules' => 'required',
'isPassword' => true,
Expand All @@ -557,7 +557,7 @@ public function extraFields()
if ($admin_password) {
$data = $data->merge([
'Admin Password' => [
'key' => 'GF_SECURITY_ADMIN_PASSWORD',
'key' => data_get($admin_password, 'key'),
'value' => data_get($admin_password, 'value'),
'rules' => 'required',
'isPassword' => true,
Expand Down Expand Up @@ -919,7 +919,7 @@ public function extraFields()
if ($admin_user) {
$data = $data->merge([
'User' => [
'key' => 'SERVICE_USER_ADMIN',
'key' => data_get($admin_user, 'key'),
'value' => data_get($admin_user, 'value', 'admin'),
'readonly' => true,
'rules' => 'required',
Expand All @@ -929,7 +929,7 @@ public function extraFields()
if ($admin_password) {
$data = $data->merge([
'Password' => [
'key' => 'SERVICE_PASSWORD_ADMIN',
'key' => data_get($admin_password, 'key'),
'value' => data_get($admin_password, 'value'),
'rules' => 'required',
'isPassword' => true,
Expand All @@ -939,7 +939,7 @@ public function extraFields()
if ($admin_email) {
$data = $data->merge([
'Email' => [
'key' => 'ADMIN_EMAIL',
'key' => data_get($admin_email, 'key'),
'value' => data_get($admin_email, 'value'),
'rules' => 'required|email',
],
Expand Down

0 comments on commit 0714fc0

Please sign in to comment.