diff --git a/Backend/controllers/user.py b/Backend/controllers/user.py index 840f138f..83b77465 100644 --- a/Backend/controllers/user.py +++ b/Backend/controllers/user.py @@ -19,7 +19,7 @@ from schemas.users import CreateUserDTO, UserSchema, UserOutDTO, UpdateUserDTO from schemas.community import CommunitySchema, CreateCommunityDTO, ViewCommunityDTO -from schemas.post import PostSchema, CreatePostSchema, PostDTO, CreatePostDTO, CreateMultiplePostDTO, CreateMultiplePostSchema, CreateMultiplePostSchemaTest +from schemas.post import PostSchema, CreatePostSchema, PostDTO, CreatePostDTO, CreateMultiplePostDTO, CreateMultiplePostSchema from models.user import User from models.community import Community from models.post import Post @@ -280,7 +280,7 @@ async def update_profile_picture(self, request: 'Request[User, Token, Any]', ses @post('/post', media_type=MediaType.TEXT) - async def create_post(self, request: 'Request[User, Token, Any]', session: AsyncSession, data: Annotated[CreateMultiplePostSchemaTest, Body(media_type=RequestEncodingType.MULTI_PART)]) -> str: + async def create_post(self, request: 'Request[User, Token, Any]', session: AsyncSession, data: Annotated[CreateMultiplePostSchema, Body(media_type=RequestEncodingType.MULTI_PART)]) -> str: ''' Creates one or multiple posts with images associated with communities. diff --git a/Backend/schemas/post.py b/Backend/schemas/post.py index 7532675a..60862aa5 100644 --- a/Backend/schemas/post.py +++ b/Backend/schemas/post.py @@ -34,16 +34,9 @@ class CreatePostSchema(Schema): model_config = ConfigDict(arbitrary_types_allowed=True) -class CreateMultiplePostSchema(Schema): - file: UploadFile - title: str - caption: str - communities_id: list[str] - - model_config = ConfigDict(arbitrary_types_allowed=True) -class CreateMultiplePostSchemaTest(Schema): +class CreateMultiplePostSchema(Schema): file: UploadFile title: str caption: str