Skip to content

Commit

Permalink
chore: lint fixes fix #369
Browse files Browse the repository at this point in the history
  • Loading branch information
bsilkyn committed Apr 29, 2024
1 parent dcbee3d commit 55cae76
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions backend/api/views/docker_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ class DockerImageViewSet(RetrieveModelMixin, CreateModelMixin, UpdateModelMixin,
serializer_class = DockerImageSerializer
permission_classes = [DockerPermission, IsAdminUser]


@action(detail=False)
def search(self, request: Request) -> Response:
self.pagination_class = BasicPagination
Expand Down Expand Up @@ -53,7 +52,6 @@ def search(self, request: Request) -> Response:

return self.get_paginated_response(serializer.data)


@action(detail=True, methods=['PATCH'], url_path='public', permission_classes=[IsAdminUser])
def patch_public(self, request: Request, **_) -> Response:
docker_image = self.get_object()
Expand All @@ -64,8 +62,6 @@ def patch_public(self, request: Request, **_) -> Response:

return Response(serializer.data)



# TODO: Maybe not necessary
# https://www.django-rest-framework.org/api-guide/permissions/#overview-of-access-restriction-methods
def list(self, request: Request) -> Response:
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/views/admin/DockerImagesView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@ const columns = ref([
{ field: 'name', header: 'admin.docker_images.name' },
{ field: 'owner', header: 'admin.docker_images.owner' },
]);
const publicOptions = ref<Array<{ value: any; label: string }>>([
{ value: true, label: 'public' },
{ value: false, label: 'private' },
]);
// const publicOptions = ref<Array<{ value: any; label: string }>>([
// { value: true, label: 'public' },
// { value: false, label: 'private' },
// ]);
const showSafetyGuard = ref<boolean>(false);
const toggleSafetyGuard = (data: any): void => {
const toggleSafetyGuard = (data: DockerImage): void => {
editItem.value.public = !data.public;
editItem.value.id = data.id;
showSafetyGuard.value = true;
Expand Down

0 comments on commit 55cae76

Please sign in to comment.