Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Status
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Fachschaft
Status
Commits
305a6b4b
Commit
305a6b4b
authored
1 year ago
by
Jakob Moser
Browse files
Options
Downloads
Patches
Plain Diff
Draft backend
parent
4c482852
No related branches found
No related tags found
1 merge request
!1
Add backend in PHP, write proper architecture documentation
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
api/v1/.htaccess
+2
-0
2 additions, 0 deletions
api/v1/.htaccess
api/v1/services.php
+24
-0
24 additions, 0 deletions
api/v1/services.php
with
26 additions
and
0 deletions
api/v1/.htaccess
0 → 100644
+
2
−
0
View file @
305a6b4b
RewriteEngine
on
RewriteRule
services$ /api/v1/services.php
This diff is collapsed.
Click to expand it.
api/v1/services.php
0 → 100644
+
24
−
0
View file @
305a6b4b
<?php
// TODO Replace this with actual true data
$services
=
[
array
(
"name"
=>
"Website"
,
"host"
=>
"fachschaft.cl.uni-heidelberg.de"
,
"status"
=>
"up"
,
"category"
=>
"public"
),
array
(
"name"
=>
"Tickets"
,
"host"
=>
"tickets.cl.uni-heidelberg.de"
,
"status"
=>
"up"
,
"category"
=>
"public"
),
];
// The browser expects to see a Content-Type indication in the HTTP headers, so we
// send one. If we hadn't written this, the content type would be text/html.
header
(
"Content-Type: application/json; charset=utf-8"
);
// Everything that is written using `echo` is sent to the client (i.e. the browser)
echo
json_encode
(
$services
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment