mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Replace the single user (defined in /data/config.php) with a multi user management thing
This commit is contained in:
@@ -11,10 +11,12 @@ $app->group('', function()
|
||||
// Base route
|
||||
$this->get('/', 'LoginControllerInstance:Root')->setName('root');
|
||||
|
||||
// Login routes
|
||||
// Login/user routes
|
||||
$this->get('/login', 'LoginControllerInstance:LoginPage')->setName('login');
|
||||
$this->post('/login', 'LoginControllerInstance:ProcessLogin')->setName('login');
|
||||
$this->get('/logout', 'LoginControllerInstance:Logout');
|
||||
$this->get('/users', 'LoginControllerInstance:UsersList');
|
||||
$this->get('/user/{userId}', 'LoginControllerInstance:UserEditForm');
|
||||
|
||||
// Stock routes
|
||||
$this->get('/stockoverview', 'Grocy\Controllers\StockController:Overview');
|
||||
@@ -69,6 +71,10 @@ $app->group('/api', function()
|
||||
$this->post('/edit-object/{entity}/{objectId}', 'Grocy\Controllers\GenericEntityApiController:EditObject');
|
||||
$this->get('/delete-object/{entity}/{objectId}', 'Grocy\Controllers\GenericEntityApiController:DeleteObject');
|
||||
|
||||
$this->post('/users/create', 'Grocy\Controllers\UsersApiController:CreateUser');
|
||||
$this->post('/users/edit/{userId}', 'Grocy\Controllers\UsersApiController:EditUser');
|
||||
$this->get('/users/delete/{userId}', 'Grocy\Controllers\UsersApiController:DeleteUser');
|
||||
|
||||
$this->get('/stock/add-product/{productId}/{amount}', 'Grocy\Controllers\StockApiController:AddProduct');
|
||||
$this->get('/stock/consume-product/{productId}/{amount}', 'Grocy\Controllers\StockApiController:ConsumeProduct');
|
||||
$this->get('/stock/inventory-product/{productId}/{newAmount}', 'Grocy\Controllers\StockApiController:InventoryProduct');
|
||||
|
Reference in New Issue
Block a user