Skip to content

Commit

Permalink
feat(api): getComments
Browse files Browse the repository at this point in the history
  • Loading branch information
so1ve committed Aug 17, 2023
1 parent b37423c commit a069d67
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/api/src/fetchers/comments.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ApiResult } from "@retalkgo/schema";
import type { $Fetch } from "ofetch";

import type { Fetcher } from "../types";
Expand All @@ -13,5 +14,11 @@ export class CommentsFetcher implements Fetcher {
return new CommentsFetcher($fetch);
}

getComments() {}
createComment() {}

async getComments(path?: string) {
if (!path) {
return await this.#fetch<ApiResult<Comment[]>>("/api/comment/getAll");
}
}
}

0 comments on commit a069d67

Please sign in to comment.