Skip to content

Commit

Permalink
chore: minor swap to apiresponse, remove unused
Browse files Browse the repository at this point in the history
  • Loading branch information
reinamora137 committed Dec 16, 2024
1 parent 71cb45d commit ea2ddb8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 111 deletions.
9 changes: 6 additions & 3 deletions routes/api/v2/stamps/balance/[address].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Handlers } from "$fresh/server.ts";
import { StampController } from "$server/controller/stampController.ts";
import { AddressHandlerContext } from "$globals";
import { getPaginationParams } from "$lib/utils/paginationUtils.ts";
import { ResponseUtil } from "$lib/utils/responseUtil.ts";
import { ApiResponseUtil } from "$lib/utils/apiResponseUtil.ts";
import {
DEFAULT_PAGINATION,
validateRequiredParams,
Expand Down Expand Up @@ -34,10 +34,13 @@ export const handler: Handlers<AddressHandlerContext> = {
limit || DEFAULT_PAGINATION.limit,
page || DEFAULT_PAGINATION.page,
);
return ResponseUtil.success(body);
return ApiResponseUtil.success(body);
} catch (error) {
console.error("Error in stamp balance handler:", error);
return ResponseUtil.internalError(error, "Error fetching stamp balance");
return ApiResponseUtil.internalError(
error,
"Error fetching stamp balance",
);
}
},
};
108 changes: 0 additions & 108 deletions swagger.js

This file was deleted.

0 comments on commit ea2ddb8

Please sign in to comment.