-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-> Rewrote the API -> Rewrote the public index.php :) -> Rewrite 80% of the structure!
- Loading branch information
Showing
160 changed files
with
729 additions
and
393 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace MythicalSystemsFramework\Api\Apis; | ||
|
||
interface ApiBuilder | ||
{ | ||
/** | ||
* This function should handle the request and return the response. | ||
*/ | ||
public function handleRequest(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
namespace MythicalSystemsFramework\Api\Apis\System; | ||
|
||
use MythicalSystemsFramework\Api\Api; | ||
use MythicalSystemsFramework\Kernel\Logger; | ||
use MythicalSystemsFramework\Kernel\LoggerTypes; | ||
use MythicalSystemsFramework\Api\Apis\ApiBuilder; | ||
use MythicalSystemsFramework\Kernel\LoggerLevels; | ||
|
||
class Logs extends Api implements ApiBuilder | ||
{ | ||
public string $route = '/system/logs'; | ||
|
||
public string $description = 'This route will just return the logs'; | ||
|
||
public function handleRequest(): void | ||
{ | ||
self::allowOnlyGET(); | ||
Api::OK('Showing you latest logs', [ | ||
'logs' => Logger::getAllSortedByDate(LoggerTypes::OTHER, LoggerLevels::OTHER, 10), | ||
]); | ||
} | ||
} |
Oops, something went wrong.