[x] Try to pull out lines 1 – 4 in the HTTP requests. Google to figure out how to do so.
[x] In the same folder as the DatabaseService you should create a new file called CheckingHelpers which contains a class with the same name. In the class, add a STATIC method isStringANumber(str: string): bool which checks if a given string would be a valid number and not empty. USE REGEX!!! Now, at /public/src/aetRequests_httpa/deleteAet_http you should now change /^\d+$/.test(…) to a call to this method. Be aware, you cannot use import or export on the frontend, instead, you should add a script tag to the helper class in HTML that use /public/src/aetRequests_httpa/deleteAet_http.
[x] In /public/src/aetRequests_http/updateAet_http, change the alert calls to console.error calls.
[x] In /public/src/calendar-dropping, change els to elements using THE IDE'S REFACTORING FUNCTIONALITY, DO NOT SIMPLY RENAME!!!!
DatabaseService
you should create a new file calledCheckingHelpers
which contains a class with the same name. In the class, add a STATIC methodisStringANumber(str: string): bool
which checks if a given string would be a valid number and not empty. USE REGEX!!! Now, at/public/src/aetRequests_httpa/deleteAet_http
you should now change/^\d+$/.test(…)
to a call to this method. Be aware, you cannot useimport
orexport
on the frontend, instead, you should add a script tag to the helper class in HTML that use/public/src/aetRequests_httpa/deleteAet_http
./public/src/aetRequests_http/updateAet_http
, change thealert
calls toconsole.error
calls./public/src/calendar-dropping
, changeels
toelements
using THE IDE'S REFACTORING FUNCTIONALITY, DO NOT SIMPLY RENAME!!!!