Updated docs

This commit is contained in:
Anna-Sara Sélea 2026-02-13 19:57:38 +01:00
parent 1a40800ed8
commit 9f7cd263ac
3 changed files with 8 additions and 6 deletions

View file

@ -14,7 +14,7 @@ class VersionController extends Controller
{
$permission = $request->permission;
if ($permission === "key_1") {
if ($permission === "key_5") {
$latest_version_participants = Version::where('table', 'participants')->latest()->first();
$latest_version_volunteers = Version::where('table', 'volunteers')->latest()->first();

View file

@ -1,7 +1,7 @@
## Endpoints
<details>
<summary><code>GET</code> <code><b>/data</b></code></summary>
<summary><code>GET</code> <code><b>/api/data</b></code></summary>
##### Headers
@ -129,7 +129,7 @@
</details>
<details>
<summary><code>GET</code> <code><b>/version</b></code></summary>
<summary><code>GET</code> <code><b>/api/version</b></code></summary>
##### Headers
@ -186,7 +186,7 @@
</details>
<details>
<summary><code>POST</code> <code><b>/participant</b></code></summary>
<summary><code>POST</code> <code><b>/api/participant</b></code></summary>
##### Headers
@ -244,7 +244,7 @@
</details>
<details>
<summary><code>POST</code> <code><b>/volunteer</b></code></summary>
<summary><code>POST</code> <code><b>/api/volunteer</b></code></summary>
##### Headers

View file

@ -2,9 +2,11 @@
> | key | permissions |
> |--------------|--------------------------------------------------------------------------------------|
> | `KEY 1` | All data from Participants and Volunteers. Can post |
> | `KEY 1` | Can post Participants and Volunteers. |
> | `KEY 2` | {lan_id, first_name, surname, guardian_name} from table Participants and Volunteers |
> | `KEY 3` | All data from table Participants |
> | `KEY 4` | {lan_id, first_name, surname, guardian_name} from table Participants |
> | `KEY 5` | Can get all Participants and Volunteers. |