Closed sij-ai closed 1 month ago
I came up with a silly workaround that I thought might be helpful in tracing the source of the issue:
url: https://api.lone.blue/note/weather/{{this.date}}?dummy=true;zip={{this.zip}}
headers: { "Authorization": "Bearer sk-REDACTED" }
response-type: txt
fixes it. It evidently doesn't like to have query parameters in a row sourced from the frontmatter?
edit -- err, evidently the relevant change that fixes it is actually using a ;
instead of &
I had harcoded an index, that's why only one variable ({{this.date}}
) was displayed.
Could you check if this is fix for you?
Hey @iodrift, I would like to know if your problem was solved and if we can close this issue.
It's fixed, thank you sir!
Describe the bug It seems the extension is mixing up frontmatter variables/values. The following in Obsidian:
results in the following API request: "GET /note/weather/2024-04-17?zip=2024-04-17&api_key=sk-REDACTED HTTP/1.1" 404 Not Found
As you can see, it's reusing the date instead of sourcing the zip. This happens regardless of whether the date is a string or a date object, or whether the zip is a string or a number.
To Reproduce See above.
Expected behavior "GET /note/weather/2024-04-17?zip=97401&api_key=sk-REDACTED HTTP/1.1" 204 OK
Desktop (please complete the following information):