mirror of
https://github.com/datarhei/core.git
synced 2025-09-27 04:16:25 +08:00
Fix omitting empty cleanup rules
This commit is contained in:
54
docs/docs.go
54
docs/docs.go
@@ -3597,7 +3597,7 @@ const docTemplate = `{
|
|||||||
"tags": [
|
"tags": [
|
||||||
"v16.?.?"
|
"v16.?.?"
|
||||||
],
|
],
|
||||||
"summary": "Add a new process",
|
"summary": "Probe a process config",
|
||||||
"operationId": "process-3-probe-config",
|
"operationId": "process-3-probe-config",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
@@ -3632,6 +3632,58 @@ const docTemplate = `{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v3/process/validate": {
|
||||||
|
"post": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Probe a process to get a detailed stream information on the inputs.",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"v16.?.?"
|
||||||
|
],
|
||||||
|
"summary": "Validate a process config",
|
||||||
|
"operationId": "process-3-validate-config",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Process config",
|
||||||
|
"name": "config",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/api.ProcessConfig"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/api.Probe"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad Request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/api.Error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Forbidden",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/api.Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v3/process/{id}": {
|
"/api/v3/process/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@@ -3590,7 +3590,7 @@
|
|||||||
"tags": [
|
"tags": [
|
||||||
"v16.?.?"
|
"v16.?.?"
|
||||||
],
|
],
|
||||||
"summary": "Add a new process",
|
"summary": "Probe a process config",
|
||||||
"operationId": "process-3-probe-config",
|
"operationId": "process-3-probe-config",
|
||||||
"parameters": [
|
"parameters": [
|
||||||
{
|
{
|
||||||
@@ -3625,6 +3625,58 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"/api/v3/process/validate": {
|
||||||
|
"post": {
|
||||||
|
"security": [
|
||||||
|
{
|
||||||
|
"ApiKeyAuth": []
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Probe a process to get a detailed stream information on the inputs.",
|
||||||
|
"consumes": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"produces": [
|
||||||
|
"application/json"
|
||||||
|
],
|
||||||
|
"tags": [
|
||||||
|
"v16.?.?"
|
||||||
|
],
|
||||||
|
"summary": "Validate a process config",
|
||||||
|
"operationId": "process-3-validate-config",
|
||||||
|
"parameters": [
|
||||||
|
{
|
||||||
|
"description": "Process config",
|
||||||
|
"name": "config",
|
||||||
|
"in": "body",
|
||||||
|
"required": true,
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/api.ProcessConfig"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responses": {
|
||||||
|
"200": {
|
||||||
|
"description": "OK",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/api.Probe"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"400": {
|
||||||
|
"description": "Bad Request",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/api.Error"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"403": {
|
||||||
|
"description": "Forbidden",
|
||||||
|
"schema": {
|
||||||
|
"$ref": "#/definitions/api.Error"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"/api/v3/process/{id}": {
|
"/api/v3/process/{id}": {
|
||||||
"get": {
|
"get": {
|
||||||
"security": [
|
"security": [
|
||||||
|
@@ -5964,7 +5964,40 @@ paths:
|
|||||||
$ref: '#/definitions/api.Error'
|
$ref: '#/definitions/api.Error'
|
||||||
security:
|
security:
|
||||||
- ApiKeyAuth: []
|
- ApiKeyAuth: []
|
||||||
summary: Add a new process
|
summary: Probe a process config
|
||||||
|
tags:
|
||||||
|
- v16.?.?
|
||||||
|
/api/v3/process/validate:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: Probe a process to get a detailed stream information on the inputs.
|
||||||
|
operationId: process-3-validate-config
|
||||||
|
parameters:
|
||||||
|
- description: Process config
|
||||||
|
in: body
|
||||||
|
name: config
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/api.ProcessConfig'
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: OK
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/api.Probe'
|
||||||
|
"400":
|
||||||
|
description: Bad Request
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/api.Error'
|
||||||
|
"403":
|
||||||
|
description: Forbidden
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/api.Error'
|
||||||
|
security:
|
||||||
|
- ApiKeyAuth: []
|
||||||
|
summary: Validate a process config
|
||||||
tags:
|
tags:
|
||||||
- v16.?.?
|
- v16.?.?
|
||||||
/api/v3/report/process:
|
/api/v3/report/process:
|
||||||
|
@@ -144,7 +144,7 @@ type ProcessConfigIO struct {
|
|||||||
ID string `json:"id"`
|
ID string `json:"id"`
|
||||||
Address string `json:"address" validate:"required" jsonschema:"minLength=1"`
|
Address string `json:"address" validate:"required" jsonschema:"minLength=1"`
|
||||||
Options []string `json:"options"`
|
Options []string `json:"options"`
|
||||||
Cleanup []ProcessConfigIOCleanup `json:"cleanup,omitempty"`
|
Cleanup []ProcessConfigIOCleanup `json:"cleanup"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type ProcessConfigIOCleanup struct {
|
type ProcessConfigIOCleanup struct {
|
||||||
|
@@ -303,6 +303,7 @@ func (h *ProcessHandler) Update(c echo.Context) error {
|
|||||||
process := api.ProcessConfig{
|
process := api.ProcessConfig{
|
||||||
ID: id,
|
ID: id,
|
||||||
Owner: ctxuser,
|
Owner: ctxuser,
|
||||||
|
Domain: domain,
|
||||||
Type: "ffmpeg",
|
Type: "ffmpeg",
|
||||||
Autostart: true,
|
Autostart: true,
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user