aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMarcel Klehr <mklehr@gmx.net>2023-10-16 16:19:19 +0200
committerMarcel Klehr <mklehr@gmx.net>2023-10-18 13:21:50 +0200
commite5efbc88d864386a441ee8f2534888652cdcf4b0 (patch)
treea347171f9840a8d252670953b34b25a19575ae40 /core
parent41847c951a48cc2c79992656b6a5bf59d9334e1f (diff)
downloadnextcloud-server-e5efbc88d864386a441ee8f2534888652cdcf4b0.tar.gz
nextcloud-server-e5efbc88d864386a441ee8f2534888652cdcf4b0.zip
enh(TextToImage): Address review comments
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'core')
-rw-r--r--core/Controller/TextToImageApiController.php5
-rw-r--r--core/Migrations/Version28000Date20230906104802.php10
2 files changed, 3 insertions, 12 deletions
diff --git a/core/Controller/TextToImageApiController.php b/core/Controller/TextToImageApiController.php
index 6ec715547fe..02692f09cdf 100644
--- a/core/Controller/TextToImageApiController.php
+++ b/core/Controller/TextToImageApiController.php
@@ -58,12 +58,11 @@ class TextToImageApiController extends \OCP\AppFramework\OCSController {
}
/**
- * @PublicPage
- *
- * Check whether this feature is available
+ * * Check whether this feature is available
*
* @return DataResponse<Http::STATUS_OK, array{isAvailable: bool}, array{}>
*/
+ #[PublicPage]
public function isAvailable(): DataResponse {
return new DataResponse([
'isAvailable' => $this->textToImageManager->hasProviders(),
diff --git a/core/Migrations/Version28000Date20230906104802.php b/core/Migrations/Version28000Date20230906104802.php
index 662bdd648b7..61f0d01dff0 100644
--- a/core/Migrations/Version28000Date20230906104802.php
+++ b/core/Migrations/Version28000Date20230906104802.php
@@ -45,7 +45,6 @@ class Version28000Date20230906104802 extends SimpleMigrationStep {
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
- $changed = false;
if (!$schema->hasTable('text2image_tasks')) {
$table = $schema->createTable('text2image_tasks');
@@ -76,11 +75,8 @@ class Version28000Date20230906104802 extends SimpleMigrationStep {
'length' => 255,
'default' => '',
]);
- $table->addColumn('last_updated', Types::INTEGER, [
+ $table->addColumn('last_updated', Types::DATETIME, [
'notnull' => false,
- 'length' => 4,
- 'default' => 0,
- 'unsigned' => true,
]);
$table->setPrimaryKey(['id'], 't2i_tasks_id_index');
@@ -88,10 +84,6 @@ class Version28000Date20230906104802 extends SimpleMigrationStep {
$table->addIndex(['status'], 't2i_tasks_status');
$table->addIndex(['user_id', 'app_id', 'identifier'], 't2i_tasks_uid_appid_ident');
- $changed = true;
- }
-
- if ($changed) {
return $schema;
}