Files
firefly-iii/resources/views/test/api-test.twig

34 lines
1001 B
Twig
Raw Normal View History

2025-08-06 20:15:02 +02:00
<html>
<head>
<title>Firefly III API test</title>
<base href="{{ route('index', null, true) }}/">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="csrf-token" content="{{ csrf_token() }}">
</head>
<body>
<p>
Hi there,
</p>
<p>
This page is created to do some basic API testing. It's not very exciting, is it?
</p>
<script src="v1/js/app.js?v={{ FF_VERSION }}" type="text/javascript" nonce="{{ JS_NONCE }}"></script>
<script type="text/javascript" nonce="{{ JS_NONCE }}">
$(function () {
"use strict";
console.log('Hello from the API test page!');
$.ajax({
url: 'api/v1/accounts?size=50&date=2025-08-06',
type: 'GET',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
},
});
});
</script>
</body>
</html>