Skip to content

Commit

Permalink
Renamed createmultiplepostschema name
Browse files Browse the repository at this point in the history
  • Loading branch information
Pupper0n1 committed Feb 2, 2024
1 parent 8bd5b73 commit 5e89001
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Backend/controllers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
9 changes: 1 addition & 8 deletions Backend/schemas/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e89001

Please sign in to comment.