From 8515d09bd764d89fc8c7caa08861b163452335af Mon Sep 17 00:00:00 2001 From: Yannic Kilcher Date: Thu, 15 Dec 2022 12:38:15 +0100 Subject: [PATCH 1/3] removed duplicate api_key entry --- backend/app/models/service_client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/app/models/service_client.py b/backend/app/models/service_client.py index f7b8295a..1a60b0be 100644 --- a/backend/app/models/service_client.py +++ b/backend/app/models/service_client.py @@ -10,7 +10,6 @@ class ServiceClient(SQLModel, table=True): name: str api_key: str service_admin_email: Optional[str] = None - api_key: str can_append: bool = True can_write: bool = False can_delete: bool = False From e444343fadbdea91521d7abdf53c5ba7c4444453 Mon Sep 17 00:00:00 2001 From: Yannic Kilcher Date: Thu, 15 Dec 2022 12:50:53 +0100 Subject: [PATCH 2/3] protocol uuid factory fix --- backend/app/schemas/protocol.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/app/schemas/protocol.py b/backend/app/schemas/protocol.py index 554c49e1..72f91e51 100644 --- a/backend/app/schemas/protocol.py +++ b/backend/app/schemas/protocol.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- from typing import Literal, Optional -from uuid import UUID +from uuid import UUID, uuid4 import pydantic from pydantic import BaseModel @@ -20,7 +20,7 @@ class GenericTaskRequest(TaskRequest): class Task(BaseModel): """A task is a unit of work that the backend gives to the frontend.""" - id: UUID = pydantic.Field(default_factory=UUID) + id: UUID = pydantic.Field(default_factory=uuid4) type: str addressed_users: Optional[list[str]] = None From 95a1ec9771a4f8cba5bdcba146db378281fa10cc Mon Sep 17 00:00:00 2001 From: Yannic Kilcher Date: Thu, 15 Dec 2022 12:58:45 +0100 Subject: [PATCH 3/3] changed post IDs to strings --- backend/app/schemas/protocol.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/app/schemas/protocol.py b/backend/app/schemas/protocol.py index 72f91e51..f1400a96 100644 --- a/backend/app/schemas/protocol.py +++ b/backend/app/schemas/protocol.py @@ -34,7 +34,7 @@ class TaskResponse(BaseModel): class PostCreatedTaskResponse(TaskResponse): type: Literal["post_created"] = "post_created" - post_id: UUID + post_id: str class SummarizeStoryTask(Task): @@ -44,7 +44,7 @@ class SummarizeStoryTask(Task): class TaskDone(Task): type: Literal["task_done"] = "task_done" - reply_to_post_id: UUID + reply_to_post_id: str class Interaction(BaseModel): @@ -58,6 +58,6 @@ class TextReplyToPost(Interaction): """A user has replied to a post with text.""" type: Literal["text_reply_to_post"] = "text_reply_to_post" - post_id: UUID - user_post_id: UUID + post_id: str + user_post_id: str text: str