Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
booru-api
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
creations
booru-api
Commits
b8947e61
Verified
Commit
b8947e61
authored
5 months ago
by
creations
Browse files
Options
Downloads
Patches
Plain Diff
enable reab, fix realb,
parent
892c67f5
Branches
Branches containing commit
No related tags found
Loading
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
config/booru.ts
+2
-2
2 additions, 2 deletions
config/booru.ts
src/routes/[booru]/random.ts
+9
-5
9 additions, 5 deletions
src/routes/[booru]/random.ts
with
11 additions
and
7 deletions
config/booru.ts
+
2
−
2
View file @
b8947e61
...
...
@@ -18,9 +18,9 @@ export const booruConfig: IBooruConfigMap = {
autocomplete
:
"
ac.rule34.xxx/autocomplete.php?q=
"
,
},
"
realbooru.com
"
:
{
enabled
:
fals
e
,
enabled
:
tru
e
,
name
:
"
realbooru.com
"
,
aliases
:
[
"
realbooru
"
,
"
rb
"
,
"
real34
"
],
aliases
:
[
"
realbooru
"
,
"
rb
"
,
"
real34
"
,
"
realb
"
],
endpoint
:
"
realbooru.com
"
,
functions
:
booruDefaults
,
autocomplete
:
"
realbooru.com/index.php?page=autocomplete&term=
"
,
...
...
This diff is collapsed.
Click to expand it.
src/routes/[booru]/random.ts
+
9
−
5
View file @
b8947e61
...
...
@@ -281,6 +281,9 @@ async function handler(
const
parsedData
:
Data
=
data
as
Data
;
let
posts
:
BooruPost
[]
=
[];
if
(
booruConfig
.
name
===
"
realbooru.com
"
)
{
posts
=
parsedData
.
post
||
[];
}
else
{
if
(
parsedData
.
post
)
{
posts
=
[
parsedData
.
post
];
}
else
if
(
parsedData
.
posts
)
{
...
...
@@ -288,6 +291,7 @@ async function handler(
}
else
{
posts
=
Array
.
isArray
(
data
)
?
(
data
as
BooruPost
[])
:
[];
}
}
if
(
posts
.
length
===
0
)
continue
;
...
...
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