edit files
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// api/controllers/PrioritasController.php
|
||||
class PrioritasController {
|
||||
public function index(): void {
|
||||
requireAuth([ROLE_ADMIN, ROLE_PENGURUS, ROLE_PIMPINAN]);
|
||||
$db = getDB();
|
||||
$rows = $db->query("SELECT * FROM v_prioritas_bantuan ORDER BY FIELD(level_prioritas,'SANGAT TINGGI','TINGGI','SEDANG','RENDAH'), jumlah_dibantu ASC")->fetchAll();
|
||||
jsonSuccess($rows);
|
||||
}
|
||||
public function show(string $id): void { jsonError('N/A',501); }
|
||||
public function store(): void { jsonError('N/A',501); }
|
||||
public function update(string $id): void { jsonError('N/A',501); }
|
||||
public function destroy(string $id): void { jsonError('N/A',501); }
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// api/controllers/ChatController.php (in same file for brevity)
|
||||
// ----------------------------------------------------------------
|
||||
// Normally in its own file — included separately below
|
||||
Reference in New Issue
Block a user