mirror of
https://github.com/YGGverse/Pulsar.git
synced 2026-03-31 17:55:37 +00:00
resolve static route in priority
This commit is contained in:
parent
1c7e01f028
commit
cf36d79cad
1 changed files with 23 additions and 25 deletions
|
|
@ -78,6 +78,15 @@ class Nex implements MessageComponentInterface
|
||||||
// Route request
|
// Route request
|
||||||
switch (true)
|
switch (true)
|
||||||
{
|
{
|
||||||
|
// Try static route settings
|
||||||
|
case isset($this->_config->route->{$request}):
|
||||||
|
|
||||||
|
$response = file_get_contents(
|
||||||
|
$this->_config->route->{$request}
|
||||||
|
);
|
||||||
|
|
||||||
|
break;
|
||||||
|
|
||||||
// Chanel item
|
// Chanel item
|
||||||
case (bool) preg_match('/\/(?<id>\d+)($|\.gmi)$/i', $request, $attribute):
|
case (bool) preg_match('/\/(?<id>\d+)($|\.gmi)$/i', $request, $attribute):
|
||||||
|
|
||||||
|
|
@ -207,17 +216,7 @@ class Nex implements MessageComponentInterface
|
||||||
// Not found
|
// Not found
|
||||||
default:
|
default:
|
||||||
|
|
||||||
// Try static route settings
|
// Create site map
|
||||||
if (isset($this->_config->route->{$request}))
|
|
||||||
{
|
|
||||||
$response = file_get_contents(
|
|
||||||
$this->_config->route->{$request}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build site map
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$lines = [];
|
$lines = [];
|
||||||
|
|
||||||
// Get channels
|
// Get channels
|
||||||
|
|
@ -236,7 +235,6 @@ class Nex implements MessageComponentInterface
|
||||||
$lines
|
$lines
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Debug message event on enabled
|
// Debug message event on enabled
|
||||||
if ($this->_config->event->message->debug->enabled)
|
if ($this->_config->event->message->debug->enabled)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue