mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-03-17 09:00:05 +01:00
Update civitai.ex
Clean empty lines
This commit is contained in:
parent
1a90f8cdc4
commit
66020ce8ac
1 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@ defmodule PhilomenaProxy.Scrapers.Civitai do
|
|||
{:ok, %{status: 200, body: body}} = PhilomenaProxy.Http.get(api_url)
|
||||
|
||||
json = Jason.decode!(body)
|
||||
|
||||
|
||||
case json["items"] do
|
||||
[] ->
|
||||
%{
|
||||
|
@ -30,10 +30,10 @@ defmodule PhilomenaProxy.Scrapers.Civitai do
|
|||
description: "",
|
||||
images: []
|
||||
}
|
||||
|
||||
|
||||
items ->
|
||||
username = hd(items)["username"]
|
||||
|
||||
|
||||
images =
|
||||
Enum.map(items, fn item ->
|
||||
image_url = item["url"]
|
||||
|
@ -42,7 +42,7 @@ defmodule PhilomenaProxy.Scrapers.Civitai do
|
|||
camo_url: PhilomenaProxy.Camo.image_url(image_url)
|
||||
}
|
||||
end)
|
||||
|
||||
|
||||
%{
|
||||
source_url: url,
|
||||
author_name: username,
|
||||
|
|
Loading…
Add table
Reference in a new issue