Removed timezone + API improvements
This commit is contained in:
@@ -177,8 +177,11 @@ namespace Api\Groups {
|
||||
}
|
||||
|
||||
$id = $this->getParam("uid");
|
||||
$sql = $this->user->getSQL();
|
||||
if (in_array($id, DEFAULT_GROUPS)) {
|
||||
return $this->createError("You cannot delete a default group.");
|
||||
}
|
||||
|
||||
$sql = $this->user->getSQL();
|
||||
$res = $sql->select($sql->count())
|
||||
->from("Group")
|
||||
->where(new Compare("uid", $id))
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Api\Routes {
|
||||
use Api\RoutesAPI;
|
||||
use Driver\SQL\Column\Column;
|
||||
use Driver\SQL\Condition\CondBool;
|
||||
use Driver\SQL\Condition\Regex;
|
||||
use Driver\SQL\Condition\CondRegex;
|
||||
|
||||
class Fetch extends RoutesAPI {
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace Api\Routes {
|
||||
->select("uid", "request", "action", "target", "extra")
|
||||
->from("Route")
|
||||
->where(new CondBool("active"))
|
||||
->where(new Regex($request, new Column("request")))
|
||||
->where(new CondRegex($request, new Column("request")))
|
||||
->limit(1)
|
||||
->execute();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user