Skip to content

Commit

Permalink
fix(api): fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Jan 17, 2025
1 parent 9e20afd commit bc326e5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions packages/api/src/comment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export interface DeleteCommentOptions extends BaseAPIOptions {
*
* 待删除的评论对象 ID
*/
objectId: string | number;
objectId: number;
}

export interface DeleteCommentResponse extends ErrorStatusResponse {
Expand Down Expand Up @@ -233,7 +233,7 @@ export interface UpdateCommentOptions extends BaseAPIOptions {
*
* Comment ID
*/
objectId: number | string;
objectId: number;

/**
* 评论数据
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface UserInfo {
*
* User object ID
*/
objectId: string | number;
objectId: number;

/**
* 用户身份
Expand Down
12 changes: 6 additions & 6 deletions packages/api/src/typings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ export interface WalineCommentData {
* @description Only available when replying comment
*/

pid?: string;
pid?: number;

/**
* Root comment id
*
* @description Only available when replying comment
*/
rid?: string;
rid?: number;

/**
* User id being at
Expand All @@ -72,7 +72,7 @@ export interface BaseWalineResponseComment {
/**
* Comment object ID
*/
objectId: string;
objectId: number;

/**
* Timestamp of the comment
Expand Down Expand Up @@ -135,7 +135,7 @@ export interface BaseWalineResponseComment {
*/
// FIXME: Rename it to `userId`
// eslint-disable-next-line @typescript-eslint/naming-convention
user_id?: string;
user_id?: number;

/**
* User location
Expand Down Expand Up @@ -205,12 +205,12 @@ export interface WalineChildComment extends BaseWalineResponseComment {
* Parent comment id
*/

pid: string;
pid: number;

/**
* Root comment id
*/
rid: string;
rid: number;

/**
* User id being at
Expand Down

0 comments on commit bc326e5

Please sign in to comment.