base: uppercase getUid
parent
d8af8ae3ba
commit
04614b9c6e
|
@ -85,7 +85,7 @@ class ApiBase extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Get logged in user's UID or throw HTTP error */
|
/** Get logged in user's UID or throw HTTP error */
|
||||||
protected function getUid(): string
|
protected function getUID(): string
|
||||||
{
|
{
|
||||||
$user = $this->userSession->getUser();
|
$user = $this->userSession->getUser();
|
||||||
if ($this->getShareToken()) {
|
if ($this->getShareToken()) {
|
||||||
|
|
|
@ -39,7 +39,7 @@ class DaysController extends ApiBase
|
||||||
public function days(): JSONResponse
|
public function days(): JSONResponse
|
||||||
{
|
{
|
||||||
// Get the folder to show
|
// Get the folder to show
|
||||||
$uid = $this->getUid();
|
$uid = $this->getUID();
|
||||||
|
|
||||||
// Get the folder to show
|
// Get the folder to show
|
||||||
$root = null;
|
$root = null;
|
||||||
|
@ -92,7 +92,7 @@ class DaysController extends ApiBase
|
||||||
public function day(string $id): JSONResponse
|
public function day(string $id): JSONResponse
|
||||||
{
|
{
|
||||||
// Get user
|
// Get user
|
||||||
$uid = $this->getUid();
|
$uid = $this->getUID();
|
||||||
|
|
||||||
// Check for wildcard
|
// Check for wildcard
|
||||||
$dayIds = [];
|
$dayIds = [];
|
||||||
|
|
|
@ -53,7 +53,7 @@ class OtherController extends ApiBase
|
||||||
return new JSONResponse(['message' => 'Cannot change settings in readonly mode'], Http::STATUS_FORBIDDEN);
|
return new JSONResponse(['message' => 'Cannot change settings in readonly mode'], Http::STATUS_FORBIDDEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
$userId = $user->getUid();
|
$userId = $user->getUID();
|
||||||
$this->config->setUserValue($userId, Application::APPNAME, $key, $value);
|
$this->config->setUserValue($userId, Application::APPNAME, $key, $value);
|
||||||
|
|
||||||
return new JSONResponse([], Http::STATUS_OK);
|
return new JSONResponse([], Http::STATUS_OK);
|
||||||
|
|
|
@ -62,7 +62,7 @@ class PageController extends Controller
|
||||||
$this->eventDispatcher->dispatchTyped(new LoadSidebar());
|
$this->eventDispatcher->dispatchTyped(new LoadSidebar());
|
||||||
|
|
||||||
// Configuration
|
// Configuration
|
||||||
$uid = $user->getUid();
|
$uid = $user->getUID();
|
||||||
$this->initialState->provideInitialState('timelinePath', $this->config->getUserValue(
|
$this->initialState->provideInitialState('timelinePath', $this->config->getUserValue(
|
||||||
$uid,
|
$uid,
|
||||||
Application::APPNAME,
|
Application::APPNAME,
|
||||||
|
|
Loading…
Reference in New Issue