Skip to content

[refactor] KeywordImagePaging 재사용 가능한 PagingClass로 리팩토링 #133

Description

@Leewonchan14

리팩토링 할 부분

class KeywordImagePaging(PagingSerializer):
    imgUrls = serializers.ListField(child=serializers.CharField())

    def __init__(self, *args, page=1, pageSize=1, object_list=None, **kwargs):
        if object_list is None:
            object_list = []

        data = get_paging_data(page, pageSize, object_list, data_name="imgUrls")

        super().__init__(data, *args, **kwargs)

위 부분을 다른 페이징 api 에서도 비슷하게 호출 가능하게 변경

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions