Comments (5)
I can reproduce this bug.
from companion.
Please give the complete HTTP request you have used.
from companion.
<script>
const url = 'http://localhost:8888/api/custom-variable/timecode/value';
fetch(url)
.then(response => {
if (!response.ok) {
throw new Error('Netzwerkantwort war nicht ok');
}
return response.text();
})
.then(data => {
console.log('Antwort:', data);
})
.catch(error => {
console.error('Fehler beim Abrufen der Daten:', error);
});
</script>
from companion.
We have a default route which serves the home page if no other route is matched.
companion/companion/lib/UI/Express.js
Lines 139 to 142 in a0ad601
The error seems to be that this route is matched before the the api route can match. I don't know why this is happening. All legacy api routes are matched before the default route and all http POST routes are matched before the default route.
The route in question is the only GET route for the new api.
from companion.
Ok, the reason is, that the new api routes are included here
after the routes of the web ui.The default route of the web ui only handles get methods, so all post requests of the new api are fulfilled but the default get will match before any api get route can match.
@Julusian you did the way of binding the new api router. Is there any reason for that or can we change it to the same way the legacy api is included?
Another more hacky soution would be to not match the default route to *
, but to /^(?!\/api).*/
from companion.
Related Issues (20)
- Trigger on buttons HOT 2
- [BUG] Companion crashing with ERR_STREAM_DESTROYED error HOT 10
- [Feat] Companion Notification Service HOT 5
- [BUG] Deleted button persists on page in some conditions HOT 4
- [BUG] Cloned button doesnt display on companion start
- [BUG] Button text does not allow white space as 1st or 2nd char of text field HOT 4
- Track button usage HOT 3
- Satellite API: Page Number button does not return page number HOT 3
- Add machine hostname as a new variable HOT 2
- Internal Button action : Change PNG HOT 1
- Logarithmic Functions in Expressions
- TypeError: envCompatible.default is not a function HOT 4
- Import Config Connections - Bulk change connections to Ignore/Create New
- [BUG] Cannot select or edit contents of custom dropdown option entry HOT 2
- Disable/Enable buttons HOT 2
- Inherit long push and release by action "internal: Button: Trigger press and release"
- Rotate surface independenly of buttons HOT 5
- [BUG] Navigate back in group not working correctly
- Add support for VEC Footpedal
- Allow adding private root certificate(s) to companion HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from companion.