mirror of
https://github.com/nextcloud/passman.git
synced 2025-01-31 19:59:19 +08:00
89 lines
No EOL
1.6 KiB
PHP
89 lines
No EOL
1.6 KiB
PHP
<?php
|
|
/**
|
|
* Nextcloud - passman
|
|
*
|
|
* This file is licensed under the Affero General Public License version 3 or
|
|
* later. See the COPYING file.
|
|
*
|
|
* @author Sander Brand <brantje@gmail.com>
|
|
* @copyright Sander Brand 2016
|
|
*/
|
|
|
|
namespace OCA\Passman\Controller;
|
|
|
|
use OCP\IRequest;
|
|
use OCP\AppFramework\Http\TemplateResponse;
|
|
use OCP\AppFramework\Http\JSONResponse;
|
|
use OCP\AppFramework\Http\DataResponse;
|
|
use OCP\AppFramework\ApiController;
|
|
|
|
class VaultController extends ApiController {
|
|
private $userId;
|
|
|
|
public function __construct($AppName, IRequest $request, $UserId) {
|
|
parent::__construct($AppName, $request);
|
|
$this->userId = $UserId;
|
|
}
|
|
|
|
/**
|
|
* @NoAdminRequired
|
|
*/
|
|
public function listVaults() {
|
|
|
|
$vaults = [
|
|
array(
|
|
'vault_id' => uniqid(),
|
|
'name' => 'Vault ' . rand(1, 20),
|
|
'created' => time(),
|
|
'last_access' => time()
|
|
),
|
|
array(
|
|
'id' => uniqid(),
|
|
'name' => 'Vault ' . rand(1, 20),
|
|
'created' => time(),
|
|
'last_access' => time()
|
|
),
|
|
array(
|
|
'id' => uniqid(),
|
|
'name' => 'Vault ' . rand(1, 20),
|
|
'created' => time(),
|
|
'last_access' => time()
|
|
),
|
|
array(
|
|
'id' => uniqid(),
|
|
'name' => 'Vault ' . rand(1, 20),
|
|
'created' => time(),
|
|
'last_access' => time()
|
|
)
|
|
];
|
|
return new JSONResponse($vaults);
|
|
}
|
|
|
|
/**
|
|
* @NoAdminRequired
|
|
*/
|
|
public function create() {
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* @NoAdminRequired
|
|
*/
|
|
public function get($vault_id) {
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* @NoAdminRequired
|
|
*/
|
|
public function update($vault_id) {
|
|
return;
|
|
}
|
|
|
|
/**
|
|
* @NoAdminRequired
|
|
*/
|
|
public function delete($vault_id) {
|
|
return;
|
|
}
|
|
} |