数据库删除备份
This commit is contained in:
parent
a7728a2129
commit
774db13d92
|
@ -136,10 +136,9 @@ class DbBackupView(APIView):
|
||||||
|
|
||||||
删除备份
|
删除备份
|
||||||
"""
|
"""
|
||||||
names = request.data.get('names', [])
|
filepaths = request.data.get('filepaths', [])
|
||||||
for i in names:
|
for i in filepaths:
|
||||||
fullpath = settings.BACKUP_PATH + '/database/' + i
|
os.remove(i)
|
||||||
os.remove(fullpath)
|
|
||||||
return Response()
|
return Response()
|
||||||
|
|
||||||
@swagger_auto_schema(manual_parameters=[
|
@swagger_auto_schema(manual_parameters=[
|
||||||
|
|
Loading…
Reference in New Issue