Skip to content
Snippets Groups Projects
Commit a7169816 authored by Christian Boettcher's avatar Christian Boettcher
Browse files

implement delete

parent 62872a42
Branches
Tags
1 merge request!1apiserver based on fastAPI
......@@ -89,7 +89,13 @@ class JsonFileStorageAdapter(AbstractLocationDataStorageAdapter):
return {id : data}
def delete(self, type:LocationDataType, id:str, usr: str):
pass
localpath = os.path.join(self.data_dir, type.value)
fullpath = os.path.join(localpath, id)
if not os.path.isfile(fullpath):
raise FileNotFoundError('The requested Object does not exist.')
os.remove(fullpath)
def getOwner(self, type: LocationDataType, id: str):
raise NotImplementedError()
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment