public function deleteMap(): array
    {
        $auth = $this->auth;
        return [
            ['DELETE', '/Navigation/[i:id]', function (int $id = null) use ($auth) {
                if ($auth->allow(["min" => 2, "max" => 1]) === false) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                if (isset($id) === false) {
                    throw new \InvalidArgumentException("No navigation link found");
                }
                $navigation = Model\Navigation::find($id);
                if ($navigation === null) {
                    throw new \DomainException("No navigation link found");
                }
                foreach ($navigation->navigations as $nested_navigation) {
                    $nested_navigation->navigation_id = $navigation->navigation_id;
                }
                $navigation->page_id = null;
                $navigation->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 202',
                            true,
                            202
                        ]
                    ],
                    "response" => true
                ];
            }],
            ['DELETE', '/Page/[i:id]', function (int $id = null) use ($auth) {
                if ($auth->allow(["min" => 3, "max" => 1]) === false) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                if (isset($id) === false) {
                    throw new \InvalidArgumentException("No page found");
                }
                $page = Model\Page::where("id", $id)->where("id", "<>", 1);
                if ($auth->allow(["min" => 2, "max" => 2]) === false
                    && $auth->allow(["min" => 3, "max" => 3]) === true) {
                    $page->where('user_id', $this->auth->details->id);
                }
                $page = $page->first();
                if ($page === null) {
                    throw new \DomainException("No page found");
                }
                foreach ($page->pages as $nested_page) {
                    $nested_page->page_id = $page->page_id;
                }
                $page->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 202',
                            true,
                            202
                        ]
                    ],
                    "response" => true
                ];
            }],
            ['DELETE', '/User/[i:id]', function (int $id = null) use ($auth) {
                if (isset($id) === false) {
                    throw new \InvalidArgumentException("No user found");
                }
                if ($auth->details === false || ($auth->details->id != $id && $auth->details->role_id != 1)) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                $user = Model\User::find($id);
                if ($user === null) {
                    throw new \DomainException("No user found");
                }
                if ($auth->details->id == $id) {
                    $auth->invalidate();
                }
                $user->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 202',
                            true,
                            202
                        ]
                    ],
                    "response" => true
                ];
            }],
            ['DELETE', '/User/logout/[a:api_session]', function (string $api_session = null) use ($auth) {
                if (isset($api_session) === false) {
                    throw new \InvalidArgumentException("No user found");
                }
                $session = Model\Session::where('code', $api_session)->first();
                if ($session === null || $auth->details === false || $auth->details->id != $session->user_id) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                $auth->invalidate($api_session);
                $session->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 200',
                            true,
                            200
                        ]
                    ],
                    "response" => true
                ];
            }],
            ['DELETE', '/User/sessions/[i:id]', function (int $id = null) use ($auth) {
                if (isset($id) === false) {
                    throw new \InvalidArgumentException("No user found");
                }
                if ($auth->details === false || ($auth->details->id != $id && $auth->details->role_id != 1)) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                $user = Model\User::find($id);
                if ($user === null) {
                    throw new \DomainException("No user found");
                }
                if ($auth->details->id == $id) {
                    $auth->invalidate();
                }
                $user->sessions()->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 202',
                            true,
                            202
                        ]
                    ],
                    "response" => true
                ];
            }]
        ];
    }
public function deleteMap(): array
    {
        $auth = $this->auth;
        return [
            ['DELETE', '/Navigation/[i:id]', function (int $id = null) use ($auth) {
                if ($auth->allow(["min" => 2, "max" => 1]) === false) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                if (isset($id) === false) {
                    throw new \InvalidArgumentException("No navigation link found");
                }
                $navigation = Model\Navigation::find($id);
                if ($navigation === null) {
                    throw new \DomainException("No navigation link found");
                }
                foreach ($navigation->navigations as $nested_navigation) {
                    $nested_navigation->navigation_id = $navigation->navigation_id;
                }
                $navigation->page_id = null;
                $navigation->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 202',
                            true,
                            202
                        ]
                    ],
                    "response" => true
                ];
            }],
            ['DELETE', '/Page/[i:id]', function (int $id = null) use ($auth) {
                if ($auth->allow(["min" => 3, "max" => 1]) === false) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                if (isset($id) === false) {
                    throw new \InvalidArgumentException("No page found");
                }
                $page = Model\Page::where("id", $id)->where("id", "<>", 1);
                if ($auth->allow(["min" => 2, "max" => 2]) === false
                    && $auth->allow(["min" => 3, "max" => 3]) === true) {
                    $page->where('user_id', $this->auth->details->id);
                }
                $page = $page->first();
                if ($page === null) {
                    throw new \DomainException("No page found");
                }
                foreach ($page->pages as $nested_page) {
                    $nested_page->page_id = $page->page_id;
                }
                $page->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 202',
                            true,
                            202
                        ]
                    ],
                    "response" => true
                ];
            }],
            ['DELETE', '/User/[i:id]', function (int $id = null) use ($auth) {
                if (isset($id) === false) {
                    throw new \InvalidArgumentException("No user found");
                }
                if ($auth->details === false || ($auth->details->id != $id && $auth->details->role_id != 1)) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                $user = Model\User::find($id);
                if ($user === null) {
                    throw new \DomainException("No user found");
                }
                if ($auth->details->id == $id) {
                    $auth->invalidate();
                }
                $user->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 202',
                            true,
                            202
                        ]
                    ],
                    "response" => true
                ];
            }],
            ['DELETE', '/User/logout/[a:api_session]', function (string $api_session = null) use ($auth) {
                if (isset($api_session) === false) {
                    throw new \InvalidArgumentException("No user found");
                }
                $session = Model\Session::where('code', $api_session)->first();
                if ($session === null || $auth->details === false || $auth->details->id != $session->user_id) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                $auth->invalidate($api_session);
                $session->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 200',
                            true,
                            200
                        ]
                    ],
                    "response" => true
                ];
            }],
            ['DELETE', '/User/sessions/[i:id]', function (int $id = null) use ($auth) {
                if (isset($id) === false) {
                    throw new \InvalidArgumentException("No user found");
                }
                if ($auth->details === false || ($auth->details->id != $id && $auth->details->role_id != 1)) {
                    return [
                        "headers" => [
                            [
                                'X-PHP-Response-Code: 401',
                                true,
                                401
                            ]
                        ],
                        "response" => "Not logged in with proper credentials"
                    ];
                }
                $user = Model\User::find($id);
                if ($user === null) {
                    throw new \DomainException("No user found");
                }
                if ($auth->details->id == $id) {
                    $auth->invalidate();
                }
                $user->sessions()->delete();
                return [
                    "headers" => [
                        [
                            'X-PHP-Response-Code: 202',
                            true,
                            202
                        ]
                    ],
                    "response" => true
                ];
            }]
        ];
    }
Returns the request map for DELETE requests

@return array