mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 20:41:20 -05:00
allow displaying of the api page
This commit is contained in:
parent
8ff8b48625
commit
7540f11074
@ -26,11 +26,6 @@ class Api extends Main
|
||||
{
|
||||
die("The API has been disabled\n");
|
||||
}
|
||||
|
||||
if (config_item('apikey') != $this->input->get('apikey'))
|
||||
{
|
||||
die("Invalid API key\n");
|
||||
}
|
||||
}
|
||||
|
||||
function index()
|
||||
@ -44,6 +39,11 @@ class Api extends Main
|
||||
|
||||
function create()
|
||||
{
|
||||
|
||||
if (config_item('apikey') != $this->input->get('apikey'))
|
||||
{
|
||||
die("Invalid API key\n");
|
||||
}
|
||||
$this->load->model('pastes');
|
||||
$this->load->library('form_validation'); //needed by parent class
|
||||
|
||||
@ -89,6 +89,11 @@ class Api extends Main
|
||||
function paste()
|
||||
{
|
||||
|
||||
if (config_item('apikey') != $this->input->get('apikey'))
|
||||
{
|
||||
die("Invalid API key\n");
|
||||
}
|
||||
|
||||
if (config_item('private_only'))
|
||||
{
|
||||
show_404();
|
||||
@ -112,6 +117,11 @@ class Api extends Main
|
||||
function random()
|
||||
{
|
||||
|
||||
if (config_item('apikey') != $this->input->get('apikey'))
|
||||
{
|
||||
die("Invalid API key\n");
|
||||
}
|
||||
|
||||
if (config_item('private_only'))
|
||||
{
|
||||
show_404();
|
||||
@ -124,6 +134,11 @@ class Api extends Main
|
||||
function recent()
|
||||
{
|
||||
|
||||
if (config_item('apikey') != $this->input->get('apikey'))
|
||||
{
|
||||
die("Invalid API key\n");
|
||||
}
|
||||
|
||||
if (config_item('private_only'))
|
||||
{
|
||||
show_404();
|
||||
@ -148,6 +163,11 @@ class Api extends Main
|
||||
function trending()
|
||||
{
|
||||
|
||||
if (config_item('apikey') != $this->input->get('apikey'))
|
||||
{
|
||||
die("Invalid API key\n");
|
||||
}
|
||||
|
||||
if (config_item('private_only'))
|
||||
{
|
||||
show_404();
|
||||
|
Loading…
x
Reference in New Issue
Block a user