Better backup storage
This commit is contained in:
parent
4b919cabd2
commit
1967e3f7fd
1 changed files with 6 additions and 5 deletions
|
@ -48,12 +48,13 @@ class BackupStatusController extends Controller
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$model->update([
|
$successful = $request->input('successful') ? true : false;
|
||||||
'is_successful' => $request->input('successful') ? true : false,
|
$model->forceFill([
|
||||||
'checksum' => $request->input('checksum_type') . ':' . $request->input('checksum'),
|
'is_successful' => $successful,
|
||||||
'bytes' => $request->input('size'),
|
'checksum' => $successful ? ($request->input('checksum_type') . ':' . $request->input('checksum')) : null,
|
||||||
|
'bytes' => $successful ? $request->input('size') : 0,
|
||||||
'completed_at' => CarbonImmutable::now(),
|
'completed_at' => CarbonImmutable::now(),
|
||||||
]);
|
])->save();
|
||||||
|
|
||||||
return new JsonResponse([], JsonResponse::HTTP_NO_CONTENT);
|
return new JsonResponse([], JsonResponse::HTTP_NO_CONTENT);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue