]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apichecknickname.php
Let's not limit qvitter stuff to 'json' requests
[quix0rs-gnu-social.git] / actions / apichecknickname.php
index 7aa1283739398e8d8b1ede3f7d07f207e960fe68..9aa834ab26ae5430b66812cf99b12d32ee2d61ee 100644 (file)
@@ -34,16 +34,20 @@ if (!defined('GNUSOCIAL')) { exit(1); }
 class ApiCheckNicknameAction extends ApiAction
 {
 
-    function prepare($args)
+    protected function prepare($args)
     {
         parent::prepare($args);
+
+        if ($this->format !== 'json') {
+            $this->clientError('This method currently only serves JSON.', 415);
+        }
         
         return true;
     }
 
-    function handle($args)
+    protected function handle()
     {
-        parent::handle($args);
+        parent::handle();
        
         $nickname = $this->trimmed('nickname');