FEAT: Added MOre Video Statuses
Build, Push and Deploy CMS / build-push-deploy (push) Failing after 2m2s

This commit is contained in:
FahdShalhoub
2026-08-17 00:13:22 +03:00
parent 4b719f712d
commit aa32bb6ed8
10 changed files with 216 additions and 146 deletions
+26 -21
View File
@@ -29,13 +29,13 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.categoriesResponse"
"$ref": "#/definitions/api.CategoriesResponse"
}
},
"500": {
"description": "Categories could not be read from the database",
"schema": {
"$ref": "#/definitions/handlers.problemDetails"
"$ref": "#/definitions/api.ProblemDetails"
}
}
}
@@ -43,7 +43,7 @@ const docTemplate = `{
},
"/api/videos": {
"post": {
"description": "Step 2 of the upload flow. Takes the storage key returned by POST /api/videos/presign — after the file has been PUT to the presigned URL — submits a MediaConvert transcoding job, and persists the video with its category links. The returned record has status \"processing\"; note that nothing currently updates that status once transcoding finishes.",
"description": "Step 2 of the upload flow. Takes the storage key returned by POST /api/videos/presign — after the file has been PUT to the presigned URL — submits a MediaConvert transcoding job, and persists the video with its category links. The returned record has status \"processing\" — one of the states \"processing\", \"ready\" or \"failed\" — though nothing currently moves it on once transcoding finishes.",
"consumes": [
"application/json"
],
@@ -61,7 +61,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.completeRequest"
"$ref": "#/definitions/api.CompleteRequest"
}
}
],
@@ -69,25 +69,25 @@ const docTemplate = `{
"201": {
"description": "Created",
"schema": {
"$ref": "#/definitions/handlers.videoResponse"
"$ref": "#/definitions/api.VideoResponse"
}
},
"400": {
"description": "Request body was not valid JSON",
"schema": {
"$ref": "#/definitions/handlers.problemDetails"
"$ref": "#/definitions/api.ProblemDetails"
}
},
"422": {
"description": "title was empty, or key was missing or not a key issued by this API",
"schema": {
"$ref": "#/definitions/handlers.problemDetails"
"$ref": "#/definitions/api.ProblemDetails"
}
},
"500": {
"description": "Transcoding job could not be queued, or the video record could not be saved",
"schema": {
"$ref": "#/definitions/handlers.problemDetails"
"$ref": "#/definitions/api.ProblemDetails"
}
}
}
@@ -113,7 +113,7 @@ const docTemplate = `{
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/handlers.presignRequest"
"$ref": "#/definitions/api.PresignRequest"
}
}
],
@@ -121,25 +121,25 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.presignResponse"
"$ref": "#/definitions/api.PresignResponse"
}
},
"400": {
"description": "Request body was not valid JSON",
"schema": {
"$ref": "#/definitions/handlers.problemDetails"
"$ref": "#/definitions/api.ProblemDetails"
}
},
"422": {
"description": "contentType was not 'video/mp4' or 'video/quicktime'",
"schema": {
"$ref": "#/definitions/handlers.problemDetails"
"$ref": "#/definitions/api.ProblemDetails"
}
},
"500": {
"description": "Upload URL could not be issued",
"schema": {
"$ref": "#/definitions/handlers.problemDetails"
"$ref": "#/definitions/api.ProblemDetails"
}
}
}
@@ -159,7 +159,7 @@ const docTemplate = `{
"200": {
"description": "OK",
"schema": {
"$ref": "#/definitions/handlers.healthResponse"
"$ref": "#/definitions/api.HealthResponse"
}
}
}
@@ -167,7 +167,7 @@ const docTemplate = `{
}
},
"definitions": {
"handlers.categoriesResponse": {
"api.CategoriesResponse": {
"type": "object",
"properties": {
"categories": {
@@ -182,7 +182,7 @@ const docTemplate = `{
}
}
},
"handlers.completeRequest": {
"api.CompleteRequest": {
"type": "object",
"properties": {
"categories": {
@@ -217,7 +217,7 @@ const docTemplate = `{
}
}
},
"handlers.healthResponse": {
"api.HealthResponse": {
"type": "object",
"properties": {
"status": {
@@ -226,7 +226,7 @@ const docTemplate = `{
}
}
},
"handlers.presignRequest": {
"api.PresignRequest": {
"type": "object",
"properties": {
"contentType": {
@@ -243,7 +243,7 @@ const docTemplate = `{
}
}
},
"handlers.presignResponse": {
"api.PresignResponse": {
"type": "object",
"properties": {
"key": {
@@ -256,7 +256,7 @@ const docTemplate = `{
}
}
},
"handlers.problemDetails": {
"api.ProblemDetails": {
"type": "object",
"properties": {
"detail": {
@@ -277,7 +277,7 @@ const docTemplate = `{
}
}
},
"handlers.videoResponse": {
"api.VideoResponse": {
"type": "object",
"properties": {
"categories": {
@@ -315,6 +315,11 @@ const docTemplate = `{
},
"status": {
"type": "string",
"enum": [
"processing",
"ready",
"failed"
],
"example": "processing"
},
"storageKey": {