Skip to content

Commit

Permalink
Change: add like for user and message
Browse files Browse the repository at this point in the history
  • Loading branch information
k7575 committed Jan 30, 2025
1 parent ba070f2 commit 78092ec
Show file tree
Hide file tree
Showing 2 changed files with 225 additions and 25 deletions.
75 changes: 75 additions & 0 deletions src/documentation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,80 @@ paths:
properties:
error:
type: string
/api/userlike:
post:
summary: Add or remove a like for a user
parameters:
- $ref: '#/components/parameters/GlobalSignatureHeader'
- $ref: '#/components/parameters/GlobalAddressHeader'
requestBody:
content:
application/json:
schema:
type: object
properties:
userAddress:
type: string
like:
type: boolean
responses:
"200":
description: Like added or removed successfully
"400":
description: Invalid JSON payload or missing required fields
content:
application/json:
schema:
type: object
properties:
error:
type: string
"500":
description: Server error
content:
application/json:
schema:
type: object
properties:
error:
type: string
/api/messagelike:
post:
summary: Add or remove a like for a message
parameters:
- $ref: '#/components/parameters/GlobalSignatureHeader'
- $ref: '#/components/parameters/GlobalAddressHeader'
requestBody:
content:
application/json:
schema:
type: object
properties:
id:
type: string
like:
type: boolean
responses:
"200":
description: Like added or removed successfully
"400":
description: Invalid JSON payload or missing required fields
content:
application/json:
schema:
type: object
properties:
error:
type: string
"500":
description: Server error
content:
application/json:
schema:
type: object
properties:
error:
type: string
/api/messages:
get:
summary: Get messages for a specific token
Expand Down Expand Up @@ -702,4 +776,5 @@ paths:
type: string
description: The error message.
example: "Internal server error"
`;
Loading

0 comments on commit 78092ec

Please sign in to comment.