Archived
1
0
Fork 0

Add request

This commit is contained in:
Ziedelth 2022-03-22 17:52:42 +01:00
parent c42343a2f4
commit 460bdf8e1c
3 changed files with 9 additions and 33 deletions

1
.gitignore vendored
View file

@ -1,2 +1,3 @@
/.idea/
/target/
/src/main/resources/hibernate.cfg.xml

View file

@ -1,29 +0,0 @@
<?xml version = "1.0" encoding = "utf-8"?>
<!DOCTYPE hibernate-configuration SYSTEM
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name = "hibernate.dialect">
org.hibernate.dialect.MariaDBDialect
</property>
<property name = "hibernate.connection.driver_class">
org.mariadb.jdbc.Driver
</property>
<!-- Assume test is the database name -->
<property name = "hibernate.connection.url">
jdbc:mariadb://localhost:3306/filmflix
</property>
<property name = "hibernate.connection.username">
filmflix
</property>
<property name = "hibernate.connection.password">
filmflix
</property>
</session-factory>
</hibernate-configuration>

View file

@ -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) {