From 28c4989d44bb3684e5f2aa944f6bfb2ff63ff2cc Mon Sep 17 00:00:00 2001 From: jo Date: Tue, 21 Jun 2022 14:43:31 +0200 Subject: [PATCH] chore(api): update StreamSetting model --- api/libretime_api/core/models/preference.py | 16 +++++++++++++--- api/schema.yml | 10 +++++----- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/api/libretime_api/core/models/preference.py b/api/libretime_api/core/models/preference.py index 37db30966..cb57cfa85 100644 --- a/api/libretime_api/core/models/preference.py +++ b/api/libretime_api/core/models/preference.py @@ -29,9 +29,19 @@ class Preference(models.Model): class StreamSetting(models.Model): - keyname = models.CharField(primary_key=True, max_length=64) - value = models.CharField(max_length=255, blank=True, null=True) - type = models.CharField(max_length=16) + key = models.CharField( + db_column="keyname", + primary_key=True, + max_length=64, + ) + value = models.CharField( + max_length=255, + blank=True, + null=True, + ) + type = models.CharField( + max_length=16, + ) class Meta: managed = False diff --git a/api/schema.yml b/api/schema.yml index c25105a75..32f688b0f 100644 --- a/api/schema.yml +++ b/api/schema.yml @@ -4760,12 +4760,12 @@ paths: schema: $ref: "#/components/schemas/StreamSetting" description: "" - /api/v2/stream-settings/{keyname}/: + /api/v2/stream-settings/{key}/: get: operationId: stream_settings_retrieve parameters: - in: path - name: keyname + name: key schema: type: string description: A unique value identifying this stream setting. @@ -4786,7 +4786,7 @@ paths: operationId: stream_settings_update parameters: - in: path - name: keyname + name: key schema: type: string description: A unique value identifying this stream setting. @@ -4819,7 +4819,7 @@ paths: operationId: stream_settings_partial_update parameters: - in: path - name: keyname + name: key schema: type: string description: A unique value identifying this stream setting. @@ -4851,7 +4851,7 @@ paths: operationId: stream_settings_destroy parameters: - in: path - name: keyname + name: key schema: type: string description: A unique value identifying this stream setting.