Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/api/sword_edit.py
# Copyright (C) 2017-2020 The Software Heritage developers | # Copyright (C) 2017-2020 The Software Heritage developers | ||||
# See the AUTHORS file at the top-level directory of this distribution | # See the AUTHORS file at the top-level directory of this distribution | ||||
# License: GNU General Public License version 3, or any later version | # License: GNU General Public License version 3, or any later version | ||||
# See top-level LICENSE file for more information | # See top-level LICENSE file for more information | ||||
from typing import Optional, Tuple | from typing import Optional, Tuple | ||||
from rest_framework import status | from rest_framework import status | ||||
from swh.storage import get_storage | from swh.storage import get_storage | ||||
from swh.storage.interface import StorageInterface | from swh.storage.interface import StorageInterface | ||||
from ..config import EDIT_IRI, EM_IRI | from ..constants import EDIT_IRI, EM_IRI | ||||
from ..models import Deposit | from ..models import Deposit | ||||
from ..parsers import SWHAtomEntryParser, SWHMultiPartParser | from ..parsers import SWHAtomEntryParser, SWHMultiPartParser | ||||
from .common import APIPost, ParsedRequestHeaders, Receipt | from .common import APIPost, ParsedRequestHeaders, Receipt | ||||
class SwordEditAPI(APIPost): | class SwordEditAPI(APIPost): | ||||
"""Deposit request class defining api endpoints for sword deposit. | """Deposit request class defining api endpoints for sword deposit. | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |