diff --git a/.gitignore b/.gitignore index 2d513a0..a2b99ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /.idea/ /target/ +/src/main/resources/hibernate.cfg.xml diff --git a/src/main/resources/hibernate.cfg.xml b/src/main/resources/hibernate.cfg.xml deleted file mode 100644 index 8bfcb25..0000000 --- a/src/main/resources/hibernate.cfg.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - org.hibernate.dialect.MariaDBDialect - - - - org.mariadb.jdbc.Driver - - - - - - jdbc:mariadb://localhost:3306/filmflix - - - - filmflix - - - - filmflix - - - \ No newline at end of file diff --git a/src/main/webapp/js/main.js b/src/main/webapp/js/main.js index 36f4b98..31f59be 100644 --- a/src/main/webapp/js/main.js +++ b/src/main/webapp/js/main.js @@ -1,11 +1,15 @@ $(document).ready(function () { console.log("OK"); - $("#films").append(generateFilmCard("lorem", "lorem")); + // $("#films").append(generateFilmCard("lorem", "lorem")); - // $.get("https://ziedelth.fr/api/v1/country/fr/page/1/limit/9/episodes", function (data) { - // console.table(data); - // }); + $.get("http://localhost:8080/api/film", function (data) { + console.table(data); + + for (let dataKey of data) { + $("#films").append(generateFilmCard(dataKey.name, dataKey.description)); + } + }); }); function generateFilmCard(title, description) {