diff --git a/app/controllers/History.php b/app/controllers/History.php index e356fd44fc19fbeec20df3d84381fc9985e72ea8..352d8d54ed1926f299d9ad8b588a6f7ebc50ddbb 100644 --- a/app/controllers/History.php +++ b/app/controllers/History.php @@ -8,7 +8,8 @@ class History extends Controller } if (isset($_COOKIE['access_token'])) { - if ($this->model('Token')->validateToken($_COOKIE['access_token'])) { + $id_user = $this->model('Token')->validateToken($_COOKIE['access_token']); + if ($id_user) { $access_valid = true; } else { $access_valid = false; @@ -22,7 +23,7 @@ class History extends Controller exit(); } else { - $data['data'] = $this->model("Order")->readHistoryByUserId($_COOKIE['id']); + $data['data'] = $this->model("Order")->readHistoryByUserId($id_user); if (count($data) > 0){ $data["navigation"] = "History"; $this->view("history", $data); diff --git a/app/controllers/Home.php b/app/controllers/Home.php index f8a8b63d316009c9e6165ca252ec29168c6aa71a..b81fd73e584bac9d47743d34b044fcb5a7e19e8a 100644 --- a/app/controllers/Home.php +++ b/app/controllers/Home.php @@ -9,7 +9,8 @@ class Home extends Controller } if (isset($_COOKIE['access_token'])) { - if ($this->model('Token')->validateToken($_COOKIE['access_token'])) { + $id_user = $this->model('Token')->validateToken($_COOKIE['access_token']); + if ($id_user) { $access_valid = true; } else { $access_valid = false; @@ -23,7 +24,7 @@ class Home extends Controller exit(); } else { - $data = $this->model("User")->readUserById($_COOKIE['id']); + $data = $this->model("User")->readUserById($id_user); $data["navigation"] = "Browse"; $this->view('home' ,$data); } @@ -62,7 +63,6 @@ class Home extends Controller } session_destroy(); $temp = $this->model("Token")->deleteToken($_COOKIE['access_token']); - setcookie("id", "", time() - 3600,'/'); setcookie("access_token","",time()-3600,'/'); header("location: /login"); exit(); diff --git a/app/controllers/Login.php b/app/controllers/Login.php index a4c018ff9ecb302d2e0ae32eee4a5a1c3cd63669..7e000f57994ba57cdedcc31d5c5b9b94f6c7b14e 100644 --- a/app/controllers/Login.php +++ b/app/controllers/Login.php @@ -38,7 +38,6 @@ class Login extends Controller if (password_verify($password, $temp["password"]) or ($password==$temp['password'])){ session_start(); $id = $model->readUserIdByUsername($temp['username'])['userID']; - setcookie('id', $id, time() + 1800, '/'); $token = substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 1).substr(md5(time()),1); setcookie('access_token', $token , time() + 1800, '/'); @@ -58,4 +57,28 @@ class Login extends Controller echo "<script>window.location.href='/login'; alert('Unknown Username'); </script>"; } } + + public function tokensignin() + { + header("Access-Control-Allow-Methods: POST"); + header("Content-Type: application/json; charset=UTF-8"); + $id_token = json_decode(file_get_contents("php://input"))->id_token; + $payload = json_decode(file_get_contents('https://www.googleapis.com/oauth2/v3/tokeninfo?id_token=' . $id_token)); + + $user_model = $this->model('User'); + if ($user = $user_model->readUserByEmail($payload->email)) { + $token = substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 1).substr(md5(time()),1); + setcookie('access_token', $token , time() + 1800, '/'); + $model_token = $this->model('Token'); + $temp_token = $model_token->insertToken($user['userID'], $token); + + if (!isset($_SESSION)) { + session_start(); + } + $_SESSION['username'] = $user['username']; + } + else { + header("HTTP/1.1 404 Not Found"); + } + } } diff --git a/app/controllers/Profile.php b/app/controllers/Profile.php index 53c534708ffabdbc8de8fc1f9ca3206c4e3a9c8f..6e02e777bb645d0b94b5abf276a7da1c733b710c 100644 --- a/app/controllers/Profile.php +++ b/app/controllers/Profile.php @@ -3,13 +3,10 @@ class Profile extends Controller { public function index() - { - if (!isset($_SESSION)) { - session_start(); - } - + { if (isset($_COOKIE['access_token'])) { - if ($this->model('Token')->validateToken($_COOKIE['access_token'])) { + $user_id = $this->model('Token')->validateToken($_COOKIE['access_token']); + if ($user_id) { $access_valid = true; } else { $access_valid = false; @@ -22,7 +19,7 @@ class Profile extends Controller header('Location: /login'); } else { - $data = $this->model("User")->readUserById($_COOKIE['id']); + $data = $this->model("User")->readUserById($user_id); $data["navigation"] = "Profile"; $this->view("profile",$data); } @@ -30,10 +27,9 @@ class Profile extends Controller public function edit() { - session_start(); - + $id_user = $this->model('Token')->validateToken($_COOKIE['access_token']); if (isset($_COOKIE['access_token'])) { - if ($this->model('Token')->validateToken($_COOKIE['access_token'])) { + if ($id_user) { $access_valid = true; } else { $access_valid = false; @@ -46,7 +42,7 @@ class Profile extends Controller header('Location: /login'); exit(); } else { - $data = $this->model("User")->readUserById($_COOKIE['id']); + $data = $this->model("User")->readUserById($id_user); $data["navigation"] = "Profile"; $this->view("editprofile", $data); } @@ -67,7 +63,7 @@ class Profile extends Controller } if ($access_valid){ - $user['id'] = $_COOKIE['id']; + $user['id'] = $user_id; $user['name'] = $_POST['name']; $user['address'] = $_POST['address']; $user['phone'] = $_POST['phone']; diff --git a/app/controllers/Register.php b/app/controllers/Register.php index 9129cfd49585b1433c5b8b7872d07d81c9cb518f..a41e3719da1831fc32d6139a016963b497dd9601 100644 --- a/app/controllers/Register.php +++ b/app/controllers/Register.php @@ -45,7 +45,6 @@ class Register extends Controller } $id = $model->readUserIdByUsername($user['username'])['userID']; - setcookie('id', $id, time() + 3600,'/'); $token = substr(str_shuffle("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, 1).substr(md5(time()),1); setcookie('access_token', $token , time() + 1800, '/'); diff --git a/app/views/detail.php b/app/views/detail.php index ca4457cacd07340cc0fd77da5c87c2513c9de8a9..7aa9695ac8c4891e3c375573f5fe8ce6077bdc9a 100644 --- a/app/views/detail.php +++ b/app/views/detail.php @@ -5,6 +5,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Detail</title> <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="google-signin-client_id" content="1039450104464-p0bpievqv6nfcbhrcvbl2vrdkg7jgnnk.apps.googleusercontent.com"> <link rel="stylesheet" type="text/css" media="screen" href="/public/css/main.css" /> </head> <body> @@ -110,5 +111,18 @@ </div> </div> <script src="/public/js/detail.js"></script> + <script> + function onLoad() { + gapi.load('auth2', function() { + gapi.auth2.init(); + }); + } + function signOut() { + var auth2 = gapi.auth2.getAuthInstance(); + auth2.signOut().then(function () { + console.log('User signed out.'); + }); + } + </script> </body> </html> diff --git a/app/views/editprofile.php b/app/views/editprofile.php index ce3fb91f9833d68022259ad46b1ade4c2e5dd068..9f5f5ac92349ba1cd14d4e4b7e8b3969254b33c6 100644 --- a/app/views/editprofile.php +++ b/app/views/editprofile.php @@ -5,51 +5,66 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Profile</title> <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="google-signin-client_id" content="1039450104464-p0bpievqv6nfcbhrcvbl2vrdkg7jgnnk.apps.googleusercontent.com"> <link rel="stylesheet" type="text/css" media="screen" href="/public/css/main.css" /> </head> <body> <?php require_once('navbar.php') ?> - <div id="edit-profile-container" class="container"> - <h1 id="edit-profile-header"class="page-header">Edit Profile</h1> - <div id ="edit-profile-section"> - <form action="/Profile/save" method="POST" id="edit-profile-form" enctype="multipart/form-data"> - <div class ="edit-profile-row"> - <img id="edit-profile-image" src="<?php if(is_null($data['userPicture'])) { echo '../../public/images/profile/default.jpg'; } else { echo $data['userPicture']; }?>"> - <div class="edit-profile-label"> - <label for="avatar"> Update Profile Picture </label> - <div id="image-input"> - <div id="filebox"></div> - <input type="button" id="browse-button" onclick="document.getElementById('ava').click()" value="Browse ..." /> - <input id = "avaHidden" class ="edit-profile-input" type="text" name="avaHidden" value="<?php if(is_null($data['userPicture'])) { echo '../../public/images/profile/default.jpg'; } else { echo $data['userPicture']; }?>" hidden> - <input type="file" id="ava" name="avatar" onchange="FileSelected()" accept="image/*"> - </div> + <div id="edit-profile-container" class="container"> + <h1 id="edit-profile-header"class="page-header">Edit Profile</h1> + <div id ="edit-profile-section"> + <form action="/Profile/save" method="POST" id="edit-profile-form" enctype="multipart/form-data"> + <div class ="edit-profile-row"> + <img id="edit-profile-image" src="<?php if(is_null($data['userPicture'])) { echo '../../public/images/profile/default.jpg'; } else { echo $data['userPicture']; }?>"> + <div class="edit-profile-label"> + <label for="avatar"> Update Profile Picture </label> + <div id="image-input"> + <div id="filebox"></div> + <input type="button" id="browse-button" onclick="document.getElementById('ava').click()" value="Browse ..." /> + <input id = "avaHidden" class ="edit-profile-input" type="text" name="avaHidden" value="<?php if(is_null($data['userPicture'])) { echo '../../public/images/profile/default.jpg'; } else { echo $data['userPicture']; }?>" hidden> + <input type="file" id="ava" name="avatar" onchange="FileSelected()" accept="image/*"> </div> </div> - <div class ="edit-profile-row"> - <label class = "edit-profile-label" for="name"> Name </label> - <input id = "nameinput" class ="edit-profile-input" type="text" name="name" value="<?php echo $data['name']?>"> - </div> - <div class ="edit-profile-row"> - <label id = "addresslabel" class = "edit-profile-label" for="address"> Address </label> - <textarea id = "addressinput" class ="edit-profile-input" form="edit-profile-form" name="address"><?php echo $data['address']?></textarea> - </div> - <div class ="edit-profile-row"> - <label class = "edit-profile-label" for="phone"> Phone Number </label> - <input id = "phoneinput" class ="edit-profile-input" type="text" name="phone" value="<?php echo $data['phone']?>" > - </div> - <div class ="edit-profile-row"> - <label class = "edit-profile-label" for="bank-account"> Bank Account </label> - <input id = "bankinput" class ="edit-profile-input" type="text" name="bank-account" value="<?php echo $data['no_kartu']?>" > - </div> - <div class ="edit-profile-row" id = "edit-profile-button-row"> - <!-- <button onclick="location.href='/Profile'" id="cancel-button" type="button">Back</button> --> - <a href="/Profile" id = "cancel-button">Back</a> - <!-- <button id="save-button" type="button">Save</button> --> - <input type="submit" value="Save" id="save-button" class="save-button"> - </div> - </form> - </div> + </div> + <div class ="edit-profile-row"> + <label class = "edit-profile-label" for="name"> Name </label> + <input id = "nameinput" class ="edit-profile-input" type="text" name="name" value="<?php echo $data['name']?>"> + </div> + <div class ="edit-profile-row"> + <label id = "addresslabel" class = "edit-profile-label" for="address"> Address </label> + <textarea id = "addressinput" class ="edit-profile-input" form="edit-profile-form" name="address"><?php echo $data['address']?></textarea> + </div> + <div class ="edit-profile-row"> + <label class = "edit-profile-label" for="phone"> Phone Number </label> + <input id = "phoneinput" class ="edit-profile-input" type="text" name="phone" value="<?php echo $data['phone']?>" > + </div> + <div class ="edit-profile-row"> + <label class = "edit-profile-label" for="bank-account"> Bank Account </label> + <input id = "bankinput" class ="edit-profile-input" type="text" name="bank-account" value="<?php echo $data['no_kartu']?>" > + </div> + <div class ="edit-profile-row" id = "edit-profile-button-row"> + <!-- <button onclick="location.href='/Profile'" id="cancel-button" type="button">Back</button> --> + <a href="/Profile" id = "cancel-button">Back</a> + <!-- <button id="save-button" type="button">Save</button> --> + <input type="submit" value="Save" id="save-button" class="save-button"> + </div> + </form> </div> - <script src="../../public/js/editprofile.js"></script> + </div> + <script src="../../public/js/editprofile.js"></script> + <script src="https://apis.google.com/js/platform.js?onload=onLoad" async defer></script> + <script> + function onLoad() { + gapi.load('auth2', function() { + gapi.auth2.init(); + }); + } + function signOut() { + var auth2 = gapi.auth2.getAuthInstance(); + auth2.signOut().then(function () { + console.log('User signed out.'); + }); + } + </script> </body> </html> diff --git a/app/views/history.php b/app/views/history.php index f2bb20b116e7084ea9726a008f4a62fdfc05c4e5..dea3911f216c266cfb6049d8afb6d13b6d6d41b1 100644 --- a/app/views/history.php +++ b/app/views/history.php @@ -5,6 +5,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Home</title> <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="google-signin-client_id" content="1039450104464-p0bpievqv6nfcbhrcvbl2vrdkg7jgnnk.apps.googleusercontent.com"> <link rel="stylesheet" type="text/css" media="screen" href="/public/css/main.css" /> </head> <body> @@ -42,5 +43,19 @@ </div> <?php } }?> </div> + <script src="https://apis.google.com/js/platform.js?onload=onLoad" async defer></script> + <script> + function onLoad() { + gapi.load('auth2', function() { + gapi.auth2.init(); + }); + } + function signOut() { + var auth2 = gapi.auth2.getAuthInstance(); + auth2.signOut().then(function () { + console.log('User signed out.'); + }); + } + </script> </body> </html> diff --git a/app/views/home.php b/app/views/home.php index 65728654087d038c1371d7adfc7ce8a36c92330f..f1956131ffd07999b621274a78c3179187aac527 100644 --- a/app/views/home.php +++ b/app/views/home.php @@ -5,6 +5,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Home</title> <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="google-signin-client_id" content="1039450104464-p0bpievqv6nfcbhrcvbl2vrdkg7jgnnk.apps.googleusercontent.com"> <link rel="stylesheet" type="text/css" media="screen" href="/public/css/main.css" /> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script> <link rel="stylesheet" href="https://loading.io/css/loading.css"> @@ -50,5 +51,19 @@ </div> </div> <script src="/public/js/search.js"></script> + <script src="https://apis.google.com/js/platform.js?onload=onLoad" async defer></script> + <script> + function onLoad() { + gapi.load('auth2', function() { + gapi.auth2.init(); + }); + } + function signOut() { + var auth2 = gapi.auth2.getAuthInstance(); + auth2.signOut().then(function () { + console.log('User signed out.'); + }); + } + </script> </body> </html> diff --git a/app/views/login.php b/app/views/login.php index ce7a1a07f3cdd885d6e42b2c638ef81629bfdeee..dc52728fff8818ce2ac024298e21103b0ae7d7d1 100644 --- a/app/views/login.php +++ b/app/views/login.php @@ -5,6 +5,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Login</title> <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="google-signin-client_id" content="1039450104464-p0bpievqv6nfcbhrcvbl2vrdkg7jgnnk.apps.googleusercontent.com"> <link rel="stylesheet" type="text/css" media="screen" href="../../public/css/main.css" /> </head> <body> @@ -22,13 +23,17 @@ <label for="password">Password</label> <input type="password" name="password"> </div> - <a href="/register">Don't have an account?</a> - <button id="submit-btn" class="disabled-btn" type="submit" disabled>LOGIN</button> + <div class="register-google-login"> + <button id="submit-btn" class="disabled-btn" type="submit" disabled>LOGIN</button> + <div class="g-signin2" data-onsuccess="onSignIn">Google</div> + </div> + <p><a href="/register">Don't have an account? register </form> </div> </div> </section> </div> + <script src="https://apis.google.com/js/platform.js" async defer></script> <script src="../../public/js/login.js"></script> </body> </html> \ No newline at end of file diff --git a/app/views/navbar.php b/app/views/navbar.php index 715ef0d89a9725d5449f6840b7268afd64b6f0cc..671ff1a22234adf0a5f350d3f46a08955f660599 100644 --- a/app/views/navbar.php +++ b/app/views/navbar.php @@ -10,7 +10,7 @@ </div> <div id="logout-button"> - <a href="/Home/logout"> + <a href="/Home/logout" onclick="signOut()"> <img src="../../public/images/logout.png"> </a> </div> @@ -29,4 +29,4 @@ </li></a> </ul> </div> -</nav> +</nav> \ No newline at end of file diff --git a/app/views/profile.php b/app/views/profile.php index 1926d084ba872b801a462c0bcb066ed5c7b76338..582e17741d7c169b23b3e19f247a710efcf60785 100644 --- a/app/views/profile.php +++ b/app/views/profile.php @@ -5,6 +5,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Profile</title> <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="google-signin-client_id" content="1039450104464-p0bpievqv6nfcbhrcvbl2vrdkg7jgnnk.apps.googleusercontent.com"> <link rel="stylesheet" type="text/css" media="screen" href="/public/css/main.css" /> </head> <body> @@ -55,5 +56,18 @@ </div> <script src="../../public/js/profile.js"></script> + <script> + function onLoad() { + gapi.load('auth2', function() { + gapi.auth2.init(); + }); + } + function signOut() { + var auth2 = gapi.auth2.getAuthInstance(); + auth2.signOut().then(function () { + console.log('User signed out.'); + }); + } + </script> </body> </html> \ No newline at end of file diff --git a/app/views/review.php b/app/views/review.php index 5b2471262209df6c8762895221a05e41bee09211..9f7139613f0636eb506951e9d24e545131132707 100644 --- a/app/views/review.php +++ b/app/views/review.php @@ -5,43 +5,57 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Review</title> <meta name="viewport" content="width=device-width, initial-scale=1"> + <meta name="google-signin-client_id" content="1039450104464-p0bpievqv6nfcbhrcvbl2vrdkg7jgnnk.apps.googleusercontent.com"> <link rel="stylesheet" type="text/css" media="screen" href="/public/css/main.css" /> </head> <body> <?php require_once('navbar.php') ?> - <div class="container"> - <div id="review-detail"> - <div id=review-desc> - <h1 class="page-header"><?php echo $data['title']?></h1> - <p id="author"><?php echo $data['author']?></p> - </div> - <img src=<?php echo $data['bookPicture']?> class="review-image"> + <div class="container"> + <div id="review-detail"> + <div id=review-desc> + <h1 class="page-header"><?php echo $data['title']?></h1> + <p id="author"><?php echo $data['author']?></p> </div> - <form action="/review/submit" id ="review-form" method="POST"> - <div class="review-rate"> - <p id="review-addrate">Add Rating</p> - <div class="rating-star-wrapper"> - <img src="/public/images/star.png" class="filled-star star star1"> - <img src="/public/images/star-unfilled.png" class="unfilled-star star star1"> - <img src="/public/images/star.png" class="filled-star star star2"> - <img src="/public/images/star-unfilled.png" class="unfilled-star star star2"> - <img src="/public/images/star.png" class="filled-star star star3"> - <img src="/public/images/star-unfilled.png" class="unfilled-star star star3"> - <img src="/public/images/star.png" class="filled-star star star4"> - <img src="/public/images/star-unfilled.png" class="unfilled-star star star4"> - <img src="/public/images/star.png" class="filled-star star star5"> - <img src="/public/images/star-unfilled.png" class="unfilled-star star star5"> - </div> - <input id="ratinginput" type="number" name="rating" value=""> - <p id="review-addrate">Add Comment</p> - <textarea id = "commentinput" class ="comment-input" form ="review-form" name="comment"></textarea> - </div> - <div class ="comment-row"> - <a href="/History" id = "back-button">Back</a> - <button id="save-button" class="disabled-save-button" type="submit" disabled>SAVE</button> - </div> - </form> + <img src=<?php echo $data['bookPicture']?> class="review-image"> </div> + <form action="/review/submit" id ="review-form" method="POST"> + <div class="review-rate"> + <p id="review-addrate">Add Rating</p> + <div class="rating-star-wrapper"> + <img src="/public/images/star.png" class="filled-star star star1"> + <img src="/public/images/star-unfilled.png" class="unfilled-star star star1"> + <img src="/public/images/star.png" class="filled-star star star2"> + <img src="/public/images/star-unfilled.png" class="unfilled-star star star2"> + <img src="/public/images/star.png" class="filled-star star star3"> + <img src="/public/images/star-unfilled.png" class="unfilled-star star star3"> + <img src="/public/images/star.png" class="filled-star star star4"> + <img src="/public/images/star-unfilled.png" class="unfilled-star star star4"> + <img src="/public/images/star.png" class="filled-star star star5"> + <img src="/public/images/star-unfilled.png" class="unfilled-star star star5"> + </div> + <input id="ratinginput" type="number" name="rating" value=""> + <p id="review-addrate">Add Comment</p> + <textarea id = "commentinput" class ="comment-input" form ="review-form" name="comment"></textarea> + </div> + <div class ="comment-row"> + <a href="/History" id = "back-button">Back</a> + <button id="save-button" class="disabled-save-button" type="submit" disabled>SAVE</button> + </div> + </form> + </div> <script src="/public/js/review.js"></script> + <script> + function onLoad() { + gapi.load('auth2', function() { + gapi.auth2.init(); + }); + } + function signOut() { + var auth2 = gapi.auth2.getAuthInstance(); + auth2.signOut().then(function () { + console.log('User signed out.'); + }); + } + </script> </body> </html> diff --git a/public/css/main.css b/public/css/main.css index c9ce394755783299421cdd3feb46ed4635dd4d19..4d7b3da810e0365d2b1e65c0d32cb3cfdc3335d6 100644 --- a/public/css/main.css +++ b/public/css/main.css @@ -904,6 +904,13 @@ body { display: none; } +.register-google-login { + display: flex; + flex-flow: column; + /* justify-content: center; */ + align-items: center; +} + @keyframes lds-spinner { 0% { opacity: 1; diff --git a/public/js/login.js b/public/js/login.js index 2e3952bcc60fa7ea215d9b62ca5adbbf9c7d2039..110a46387507322503045887d92848def2e2fe3a 100644 --- a/public/js/login.js +++ b/public/js/login.js @@ -33,4 +33,22 @@ document.querySelector("#password input").addEventListener("input", function() { pass_valid = true; } toggle_btn(); -}) \ No newline at end of file +}); + +function onSignIn(googleUser) { + var id_token = googleUser.getAuthResponse().id_token; + var xhr = new XMLHttpRequest(); + xhr.onreadystatechange = function() { + if (this.readyState == 4 && this.status == 200) { + window.location="/home"; + } + else { + var auth2 = gapi.auth2.getAuthInstance(); + auth2.signOut(); + } + } + + xhr.open('POST', '/login/tokensignin'); + xhr.setRequestHeader('Content-Type', 'application/json'); + xhr.send(JSON.stringify({id_token: id_token})); +} \ No newline at end of file diff --git a/service/soap/src/model/Book.java b/service/soap/src/model/Book.java index 1177bb9206122e4a772e7ad93fee2fd327dd2e1d..6012076f8e5f5b4e3dc58e3a9f6b89fcb6a4f322 100644 --- a/service/soap/src/model/Book.java +++ b/service/soap/src/model/Book.java @@ -43,7 +43,7 @@ public class Book implements Serializable { this.title = STRING_UNDEFINED; this.author = STRING_UNDEFINED; this.description = STRING_UNDEFINED; - this.image = "https://almasoem.sch.id/wp-content/uploads/2016/02/IMG_9738-Large-1024x683.jpg"; + this.image = "https://upload.wikimedia.org/wikipedia/commons/thumb/f/fc/No_picture_available.png/401px-No_picture_available.png"; this.price = -1; }