Add request
This commit is contained in:
parent
c42343a2f4
commit
460bdf8e1c
3 changed files with 9 additions and 33 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1,3 @@
|
||||||
/.idea/
|
/.idea/
|
||||||
/target/
|
/target/
|
||||||
|
/src/main/resources/hibernate.cfg.xml
|
||||||
|
|
|
@ -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>
|
|
|
@ -1,11 +1,15 @@
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
console.log("OK");
|
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) {
|
$.get("http://localhost:8080/api/film", function (data) {
|
||||||
// console.table(data);
|
console.table(data);
|
||||||
// });
|
|
||||||
|
for (let dataKey of data) {
|
||||||
|
$("#films").append(generateFilmCard(dataKey.name, dataKey.description));
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function generateFilmCard(title, description) {
|
function generateFilmCard(title, description) {
|
||||||
|
|
Reference in a new issue