Skip to content

Commit

Permalink
exported types
Browse files Browse the repository at this point in the history
  • Loading branch information
itzomen committed Aug 30, 2023
1 parent cf70089 commit f0d1bca
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/**
* Export all from "lib" and "types"
*/
import { fetchRequest, FetchError, fetchContent } from "@/lib";
export * from "@/lib";
export * from "@/types";
import { FetchError, fetchContent } from "@/lib";
import {
ClientOptions,
CMSContent,
Expand All @@ -11,8 +13,6 @@ import {
NotFoundContents,
} from "@/types";

export { fetchRequest, FetchError, fetchContent };

/**
* Class representing a client for fetching CMS content.
*/
Expand Down
4 changes: 2 additions & 2 deletions src/lib/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class FetchError extends Error {
* }
*/
export const fetchRequest = async (
method: string,
method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD",
url: RequestInfo | URL,
data: any,
headers?: HeadersInit,
Expand All @@ -64,7 +64,7 @@ export const fetchRequest = async (
} catch (error) {
console.group("FETCH_REQUEST_ERROR");
console.log("method: ", method);
console.log("url: ", url)
console.log("url: ", url);
console.log("data: ", data);
console.log("headers: ", headers);
console.log("error: ", error);
Expand Down
File renamed without changes.

0 comments on commit f0d1bca

Please sign in to comment.