Post

Endpoints for managing forum posts.

'/posts'

POST

async create(
    @requestBody({
      content: {
        'application/json': {
          schema: getModelSchemaRef(Post, {
            title: 'NewPost',
            exclude: ['id'],
          }),
        },
      },
    })
    post: Omit<Post, 'id'>,
  ): Promise<object>

Auth: Yes

Create a post for a user.

GET

Auth: Yes

Get all posts.

PATCH

Auth: Yes RBAC: Admin, User (owner)

Update all posts.

'/posts/count'

GET

Auth: No

Get the number of posts.

'/posts/{id}'

GET

Auth: No

Get a specific post by ID.

PATCH

Auth: Yes RBAC: Admin, User (owner)

Update a specific post by ID.

PUT

Auth: Yes RBAC: Admin, User (owner)

Overwrite a specific post by ID.

DEL

Auth: Yes RBAC: Admin, User (owner)

Overwrite a specific post by ID.

GET

Auth: No

Get all featured posts.

Last updated