Skip to content

Commit de14b36

Browse files
committed
add database agent type
1 parent 16b536f commit de14b36

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Service/Agent/Validator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private function assertName(string $name, ?string $tenantId, ?Table\Generated\Ag
105105

106106
private function assertType(int $type): void
107107
{
108-
if (!in_array($type, [Table\Agent::TYPE_GENERAL, Table\Agent::TYPE_OPERATION, Table\Agent::TYPE_ACTION, Table\Agent::TYPE_SCHEMA], true)) {
108+
if (!in_array($type, [Table\Agent::TYPE_GENERAL, Table\Agent::TYPE_OPERATION, Table\Agent::TYPE_ACTION, Table\Agent::TYPE_SCHEMA, Table\Agent::TYPE_DATABASE], true)) {
109109
throw new StatusCode\BadRequestException('Provided an invalid agent type');
110110
}
111111
}

src/Table/Agent.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ class Agent extends Generated\AgentTable
3939
public const TYPE_OPERATION = 1;
4040
public const TYPE_ACTION = 2;
4141
public const TYPE_SCHEMA = 3;
42+
public const TYPE_DATABASE = 4;
4243

4344
public function findOneByIdentifier(?string $tenantId, int $categoryId, string $id): ?AgentRow
4445
{

0 commit comments

Comments
 (0)