Skip to content

Commit

Permalink
Add /events to ajax urls
Browse files Browse the repository at this point in the history
  • Loading branch information
JoepdeJong committed Nov 3, 2023
1 parent 4d27034 commit 5e09f88
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/static/js/events/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $(document).ready(function () {
$('#productSellEnd').flatpickr(config);

$('#q').autocomplete({
serviceUrl: '/api/v1/products/search/unused',
serviceUrl: '/events/api/v1/products/search/unused',
onSelect: function (suggestion) {
addProductToEvent(suggestion.data, suggestion.value);
$(this).val('');
Expand Down Expand Up @@ -160,7 +160,7 @@ $(document).ready(function () {
};

$.ajax({
url: '/api/v1/products',
url: '/events/api/v1/products',
type: 'POST',
headers: {
'Content-Type': "application/json"
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/js/events/script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/resources/static/js/products/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ $(document).ready(function () {
$('#sellEnd').flatpickr(config);

$('#q').autocomplete({
serviceUrl: '/api/v1/products/search/unused',
serviceUrl: '/events/api/v1/products/search/unused',
onSelect: function (suggestion) {
addProductToEvent(suggestion.data, suggestion.value);
$(this).val('');
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/static/js/products/script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/resources/templates/sales/scan/event/barcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ <h4 class="display-4 text-white" style="font-size: 2rem;" id="successCustomer"><

$.ajax({
method: "POST",
url: "/api/v1/sales/scan/event/[[${event.getKey()}]]/barcode",
url: "/events/api/v1/sales/scan/event/[[${event.getKey()}]]/barcode",
type: "json",
data: {
_csrf: "[[${_csrf.token}]]",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/sales/scan/event/code.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h4 class="display-4 text-white" style="font-size: 2rem;" id="successCustomer"><

$.ajax({
method: "POST",
url: "/api/v1/sales/scan/event/[[${event.getKey()}]]/code",
url: "/events/api/v1/sales/scan/event/[[${event.getKey()}]]/code",
type: "json",
data: {
_csrf: "[[${_csrf.token}]]",
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/templates/sales/scan/event/qrcode.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ <h4 class="display-4 text-white" style="font-size: 2rem;" id="successCustomer"><
active = false;
$.ajax({
method: "POST",
url: "/api/v1/sales/scan/event/[[${event.getKey()}]]/code",
url: "/events/api/v1/sales/scan/event/[[${event.getKey()}]]/code",
type: "json",
data: {
_csrf: "[[${_csrf.token}]]",
Expand Down

0 comments on commit 5e09f88

Please sign in to comment.