Skip to content

Commit 804ef06

Browse files
committed
rename autoUpdateConfig to autoDetectFeatures
Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
1 parent 614eaf9 commit 804ef06

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

appinfo/routes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
['name' => 'config#setSensitiveUserConfig', 'url' => '/config/sensitive', 'verb' => 'PUT'],
1212
['name' => 'config#setAdminConfig', 'url' => '/admin-config', 'verb' => 'PUT'],
1313
['name' => 'config#setSensitiveAdminConfig', 'url' => '/admin-config/sensitive', 'verb' => 'PUT'],
14-
['name' => 'config#autoUpdateConfig', 'url' => '/admin-config/auto-update', 'verb' => 'POST'],
14+
['name' => 'config#autoDetectFeatures', 'url' => '/admin-config/auto-detect-features', 'verb' => 'POST'],
1515

1616
['name' => 'openAiAPI#getModels', 'url' => '/models', 'verb' => 'GET'],
1717
['name' => 'openAiAPI#getUserQuotaInfo', 'url' => '/quota-info', 'verb' => 'GET'],

lib/Controller/ConfigController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ public function setSensitiveAdminConfig(array $values): DataResponse {
105105
* Set admin config values
106106
* @return DataResponse
107107
*/
108-
public function autoUpdateConfig(): DataResponse {
108+
public function autoDetectFeatures(): DataResponse {
109109
try {
110-
$config = $this->openAiAPIService->autoUpdateConfig();
110+
$config = $this->openAiAPIService->autoDetectFeatures();
111111
return new DataResponse($config);
112112
} catch (Exception $e) {
113113
return new DataResponse(['error' => $e->getMessage()], Http::STATUS_BAD_REQUEST);

lib/Service/OpenAiAPIService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ public function isTTSAvailable(): bool {
10951095
* @return array the updated config
10961096
* @throws Exception
10971097
*/
1098-
public function autoUpdateConfig(): array {
1098+
public function autoDetectFeatures(): array {
10991099
$config = [];
11001100
$config['t2i_provider_enabled'] = $this->isT2IAvailable();
11011101
$config['stt_provider_enabled'] = $this->isSTTAvailable();

src/components/AdminSettings.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,8 +705,8 @@ export default {
705705
label: model.id + (model.owned_by ? ' (' + model.owned_by + ')' : ''),
706706
}
707707
},
708-
autoUpdateConfig() {
709-
return axios.post(generateUrl('/apps/integration_openai/admin-config/auto-update')).then((response) => {
708+
autoDetectFeatures() {
709+
return axios.post(generateUrl('/apps/integration_openai/admin-config/auto-detect-features')).then((response) => {
710710
const data = response.data ?? {}
711711
console.debug(data)
712712
this.state = {
@@ -859,7 +859,7 @@ export default {
859859
if (getModels) {
860860
this.getModels()
861861
}
862-
this.autoUpdateConfig()
862+
this.autoDetectFeatures()
863863
}, 2000),
864864
onInput: debounce(async function() {
865865
// sanitize quotas

0 commit comments

Comments
 (0)