Revert "exclude pin name if empty or null"

This reverts commit 741fcf8b19.
This commit is contained in:
Citlali del Rey 2023-09-01 12:50:08 -07:00
parent 741fcf8b19
commit fc74265795
Signed by: nullobsi
GPG Key ID: 933A1F44222C2634
1 changed files with 4 additions and 5 deletions

View File

@ -70,16 +70,15 @@ sub get($c) {
})
}
my %pinobj;
$pinobj{cid} = $pin->{cid};
$pinobj{name} = $pin->{name} if defined $pin->{name} and $pin->{name} ne "";
return $c->render(status => 200, openapi => {
requestid => $pin->{id},
# TODO
status => "pinned",
created => IpfsUpload::Util::date_format($pin->{created_at}),
pin => \%pinobj,
pin => {
cid => $pin->{cid},
name => $pin->{name},
},
delegates => $c->config->{ipfs}->{delegates},
meta => { app_name => $pin->{app_name}},
});