mirror of
https://github.com/nextcloud/ocsms.git
synced 2026-08-11 16:32:55 +00:00
Fix ordering into app loader. Also fix a syntax... newbie... issue
This commit is contained in:
@@ -43,13 +43,20 @@ class OcSmsApp extends App {
|
||||
$this->c = $container;
|
||||
$app = $this;
|
||||
|
||||
/**
|
||||
* Core
|
||||
*/
|
||||
$container->registerService('UserId', function($c) {
|
||||
return \OCP\User::getUser();
|
||||
});
|
||||
|
||||
/**
|
||||
* Database Layer
|
||||
*/
|
||||
$container->registerService('ConfigMapper', function ($c) use ($app) {
|
||||
return new ConfigMapper(
|
||||
$c->query('ServerContainer')->getDb(),
|
||||
$app->getUserId(),
|
||||
$c->query('UserId'),
|
||||
$c->query('ServerContainer')->getCrypto()
|
||||
);
|
||||
});
|
||||
@@ -62,13 +69,6 @@ class OcSmsApp extends App {
|
||||
return new SmsMapper($c->query('ServerContainer')->getDb());
|
||||
});
|
||||
|
||||
/**
|
||||
* Core
|
||||
*/
|
||||
$container->registerService('UserId', function($c) {
|
||||
return \OCP\User::getUser();
|
||||
});
|
||||
|
||||
/**
|
||||
* Controllers
|
||||
*/
|
||||
|
||||
@@ -54,4 +54,6 @@ class ConfigMapper extends Mapper {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user