Skip to content

Commit 8df0422

Browse files
fix: make Service name unique field
1 parent 33d3247 commit 8df0422

File tree

1 file changed

+5
-1
lines changed
  • pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models

1 file changed

+5
-1
lines changed

pfSense-pkg-RESTAPI/files/usr/local/pkg/RESTAPI/Models/Service.inc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ class Service extends Model {
3030
write_only: true,
3131
help_text: 'The action to perform against this service.',
3232
);
33-
$this->name = new StringField(read_only: true, help_text: 'The internal name of the service.');
33+
$this->name = new StringField(
34+
unique: true,
35+
read_only: true,
36+
help_text: 'The internal name of the service.'
37+
);
3438
$this->description = new StringField(read_only: true, help_text: 'The full descriptive name of the service.');
3539
$this->enabled = new BooleanField(
3640
read_only: true,

0 commit comments

Comments
 (0)