Skip to content

Commit

Permalink
tambah dto
Browse files Browse the repository at this point in the history
  • Loading branch information
Armand96 committed Apr 17, 2024
1 parent 76bafb4 commit ad7e2f6
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 2 additions & 0 deletions env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
SERVER_KEY=U0ItTWlkLXNlcnZlci1GTzllNFFRTlZjVVJmUEYtb2UxMWU5ZFg=
SECRET=QmFoYXNhQXN1MTIz
1 change: 0 additions & 1 deletion src/module/product/services/product_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ namespace gaboot

m_response.m_message = "Success retrieve products data";
m_response.m_success = true;
m_response.m_data = product.to_json();

return HttpResponse::newHttpJsonResponse(m_response.to_json());
} EXCEPT_CLAUSE
Expand Down
10 changes: 6 additions & 4 deletions src/module/wishlist/services/wishlist_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ namespace gaboot

this->load_cache();

const auto user = m_cache_wishlist.find(id);
WishlistResponse wishlist = m_cache_wishlist.find(id);

if (!user) throw NotFoundException("Unable retrieve wishlist detail");
// if (!wishlist) throw NotFoundException("Unable retrieve wishlist detail");

m_response.m_message = "Success retrieve wishlist data";
m_response.m_success = true;
m_response.m_data = user->toJson();
m_response = wishlist;

return HttpResponse::newHttpJsonResponse(m_response.to_json());
} EXCEPT_CLAUSE
Expand Down Expand Up @@ -124,7 +124,9 @@ namespace gaboot
if (!m_cache_wishlist.update(id, *wishlist) || !db().updateFuture(*wishlist).get())
throw BadRequestException("Unable to update non-existing record");

m_response.m_data = wishlist->toJson();
WishlistResponse wishlistR = wishlist;

m_response = wishlistR;
m_response.m_message = "Success update wishlist data.";
m_response.m_success = true;

Expand Down
9 changes: 9 additions & 0 deletions src/util/version.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "version.hpp"

namespace gaboot
{
const char* server_version::GIT_SHA1 = "0577535eb6238629d28fb926cd4f076d98a10a04";
const char* server_version::GIT_BRANCH = "main";
const char* server_version::GIT_DATE = "Sat Nov 25 12:58:10 2023";
const char* server_version::GIT_COMMIT_SUBJECT = "bug marked";
};

0 comments on commit ad7e2f6

Please sign in to comment.