Gitea API Problem
- Dominant language
- JavaScript
- Stars
- 19.4k
- Forks
- 3.1k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 9
Description
Hi,
I am trying to set up decap with gitea. But I guess there is a bug with the usage of the repos/git/trees API.
Example: I try to list my assets.
There is always a 404 for all content defined in netlify. In browser console, I can see, that a GET to `https://git.***.dev/api/v1/repos/***/blog-ng/git/trees/dev:elegantstack%2Fsite%2Fcontent%2Fassets` is fired.
When I do a curl to `https://git.***.dev/api/v1/repos/***/blog-ng/git/trees/dev:elegantstack`, I get a response. But I cant add any more subdirectories. curl to `https://git.***.dev/api/v1/repos/***/blog-ng/git/trees/dev:elegantstack%2Fsite` will result in a 404 again.
The path for the assets is correct of course. Maybe the api usage need to be changed to query the root path wit recursive=1?
Edit:
I am using Gitea API 1.21.1.
Seems that there is also no file-path option for the api you use (or they removed it).
Example: this request is working:
```
curl 'https://git.***.dev/api/v1/repos/***/blog-ng/contents/elegantstack/site/content/assets?ref=dev'
```
Contributor guide
Assessment
This issue has not been assessed yet.