User Liked Post

'/users/{id}/liked-posts'

GET

async getAll(
    @param.path.string('id') id: string,
    @param.query.object('filter') filter?: Filter<Post>,
  ): Promise<Post[]>

Auth: Yes RBAC: Admin, User (owner)

Get posts a user has liked.

'/users/{id}/liked-posts/{postId}'

GET

async find(
    @param.path.string('id') id: string,
    @param.path.number('postId') postId: typeof Post.prototype.id,
  ): Promise<Post>

Auth: Yes RBAC: Admin, User (owner)

Check a specific post a user has liked.

POST

async create(
    @param.path.string('id') id: typeof User.prototype.id,
    @param.path.number('postId') postId: typeof Post.prototype.id,
  ): Promise<void>

Auth: Yes RBAC: Admin, User (owner)

Like a specific post for a given user.

DEL

async delete(
    @param.path.string('id') id: typeof User.prototype.id,
    @param.path.number('postId') postId: typeof Post.prototype.id,
  ): Promise<void>

Auth: Yes RBAC: Admin, User (owner)

Remove a like for a specific post for a given user.

Last updated