Add logging
This commit is contained in:
parent
42c59c17ee
commit
ebb04e548c
|
@ -18,7 +18,9 @@ export async function isDirectory(cid: string): Promise<boolean> {
|
|||
// TODO: terribly hacky but needed quick fix, it turns out files now contain
|
||||
// multiple link objects as well so this method of checking whether it's a
|
||||
// directory or not is not as great as it used to be
|
||||
return (json["Links"].length && json["Links"][0] && json["Links"][0]["Name"] && json["Links"][0]["Name"] !== "")
|
||||
const isDir = (json["Links"].length && json["Links"][0] && json["Links"][0]["Name"] && json["Links"][0]["Name"] !== "")
|
||||
console.log("Links", json["Links"])
|
||||
return isDir
|
||||
}
|
||||
|
||||
export async function download(cid: string, destination: string, directory: boolean): Promise<boolean> {
|
||||
|
|
Reference in New Issue