Commit 98a923ad authored by Jakob Moser's avatar Jakob Moser
Browse files

Reformat code

parent 1941d74e
Loading
Loading
Loading
Loading
+17 −19
Original line number Diff line number Diff line
<!DOCTYPE html>
<!doctype html>
<html lang="en">

    <head>
        <title>Status API | Fachschaft Computerlinguistik</title>

@@ -20,5 +19,4 @@
        <redoc spec-url="./openapi-spec.yaml"></redoc>
        <script src="/lib/redoc/redoc.standalone.js"></script>
    </body>

</html>
+16 −14
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ const apiBase = "/api/v1/services"
 * @returns A list of service objects
 */
async function getServices() {

    /*
     * Use fetch to make an HTTPS request to the API. fetch() is an asynchronous function,
     * meaning we have to "wait" for it to return using `await` (the nice thing is that
@@ -41,9 +40,12 @@ function getServiceUrl(serviceHost) {
 */
function getStatusInterpretation(statusCode) {
    switch (statusCode) {
        case 200: return ["Up", "green"]
        case 401: return ["Protected", "yellow"]
        default: return ["Down", "red"]
        case 200:
            return ["Up", "green"]
        case 401:
            return ["Protected", "yellow"]
        default:
            return ["Down", "red"]
    }
}

+77 −77

File changed.

Contains only whitespace changes.

+11 −11

File changed.

Contains only whitespace changes.