mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
+api
This commit is contained in:
parent
0257da7e35
commit
d162fb1284
33
htdocs/application/controllers/api.php
Executable file
33
htdocs/application/controllers/api.php
Executable file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* Class and Function List:
|
||||
* Function list:
|
||||
* - __construct()
|
||||
* - create()
|
||||
* Classes list:
|
||||
* - Api extends Main
|
||||
*/
|
||||
include_once ('application/controllers/main.php');
|
||||
|
||||
class Api extends Main
|
||||
{
|
||||
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
function create()
|
||||
{
|
||||
$this->load->model('pastes');
|
||||
|
||||
if (!$this->input->post('text'))
|
||||
{
|
||||
echo 'missing paste text';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo $this->pastes->createPaste();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user