0
1
Fork 0
hedera-web-mindshore/web/rest/image.php

31 lines
555 B
PHP
Raw Normal View History

<?php
require_once ('vn/image/db.php');
use Vn\Image;
use Vn\Web\Auth;
2015-01-31 01:05:12 +00:00
use Vn\Rest;
2015-01-31 01:05:12 +00:00
class RestMod extends Rest\Module
{
function run ()
{
2016-04-26 10:54:12 +00:00
// throw new Rest\Exception ('Image', 'inMaintenance',
// 'Servicio no disponible temporalmente por '.
// 'mantenimiento, intentalo de nuevo más tarde');
try {
2015-01-31 01:05:12 +00:00
Image\Db::init (Auth::getUser (), Auth::getPassword ());
Image\Db::upload ();
Image\Db::deinit ();
2015-01-31 01:05:12 +00:00
return TRUE;
}
catch (Exception $e)
{
throw new Rest\Exception ('Image', $e->getCode (), $e->getMessage ());
}
}
}
?>