User Saved Post

'/users/{id}/saved-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 a user's saved posts.

'/users/{id}/saved-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 saved post for a user.

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)

Save a post for a 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)

Unsave a post for a user.

Last updated