source: lliurex-jocomunico/trunk/fuentes/lliurex-jocomunico.install/var/lib/application/controllers/Histo.php @ 5728

Last change on this file since 5728 was 5728, checked in by joamuran, 3 years ago

Added zero-installed and updated jocomunico

  • Property svn:executable set to *
File size: 831 bytes
Line 
1
2<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
3
4require APPPATH . '/libraries/REST_Controller.php';
5
6class Histo extends REST_Controller {
7   
8    public function __construct()
9    {
10        parent::__construct();
11        $this->load->model('histo_model');
12
13    }
14       
15    public function index_get()
16    {
17        $pictoid = $this->query("pictoid");
18       
19        if($pictoid == NULL || $pictoid == "") {
20            $this->response("missing argument picto id", 400);
21            return;
22        }
23       
24        $saveResult = $this->histo_model->HistSearch($pictoid);
25
26        $response = [
27            "data" => $saveResult
28        ];
29       
30        $this->response($response, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
31
32    }
33}
Note: See TracBrowser for help on using the repository browser.