Update logic for tracking a server's transfer state

This commit is contained in:
Matthew Penner 2020-12-16 09:34:47 -07:00
parent 5d03c0d2e5
commit e6c4a68e4a
20 changed files with 206 additions and 74 deletions

View file

@ -80,6 +80,14 @@ class AccessingValidServer
return $this->response->view('errors.installing', [], 409);
}
if ($server->transfer !== null) {
if ($isApiRequest) {
throw new ConflictHttpException('Server is currently being transferred.');
}
return $this->response->view('errors.transferring', [], 409);
}
// Add server to the request attributes. This will replace sessions
// as files are updated.
$request->attributes->set('server', $server);