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