Skip to content

Commit

Permalink
changes route
Browse files Browse the repository at this point in the history
  • Loading branch information
piyush-bitpack committed Jan 3, 2024
1 parent d3a0d4a commit 4e1e0db
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/api/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const ApiEndpoints = {
SEARCH_BY_PKG_ID: "dapp/queryWithPackageId",
REVIEWS: "reviews",
RATING: "dapp/rate",
POSTRATING: "dapp/newRate",
FETCH_USER: "fetchuser",
POST_USER: "postuser",
SEARCH: "dapp/search",
Expand Down
2 changes: 1 addition & 1 deletion src/components/card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function ReviewCard(props) {
{review.userId}
<span className="text-[#87868C]">
&#x2022;{" "}
{`${date.getDate()}/${date.getMonth()}/${date.getFullYear()}`}
{`${date.getDate()}/${date.getMonth()+1}/${date.getFullYear()}`}
</span>
</p>
<StarRating rating={review.rating} />
Expand Down
7 changes: 5 additions & 2 deletions src/features/dapp/dapp_api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,14 +184,17 @@ export class DappDataSource implements IDappDataSource {
postReview(builder: EndpointBuilder<any, any, any>) {
return builder.mutation<void, any>({
query: ({ ...body }) => {
const newBody = {...body}
delete newBody?.signature
delete newBody?.message
return {
url: `${ApiEndpoints.RATING}`,
url: `${ApiEndpoints.POSTRATING}`,
headers: {
'x-message': body?.message,
'x-signature': body?.signature
},
method: "POST",
body: body,
body: newBody,
};
},
});
Expand Down

0 comments on commit 4e1e0db

Please sign in to comment.