Skip to content
This repository has been archived by the owner on Aug 13, 2023. It is now read-only.

Create Article Endpoint #30

Closed
LamboCreeper opened this issue May 30, 2022 · 0 comments · Fixed by #35
Closed

Create Article Endpoint #30

LamboCreeper opened this issue May 30, 2022 · 0 comments · Fixed by #35
Assignees
Labels
accepted The issue is accepted and PRs are welcome enhancement New feature or request
Milestone

Comments

@LamboCreeper
Copy link
Member

Requires #27

What Functionality Are You Suggesting?

The ability to create an article.

API Endpoint

POST /article/:id

Users are required to be authenticated to access this endpoint.

Request Body

{
    title: string;
    description: string;
    content: string;
}

The article's user field should be set to the id of the user making the request. The status field should be set to PENDING.

Response Body

{
    id: number;
    created: string; // simplified extended ISO formatted date
    modified: string; // simplified extended ISO formatted date
    title: string;
    description: string;
    content: string;
    status: ArticleStatus; // APPROVED, PENDING, REJECTED
    user: {
        id: number;
        username: string;
        created: string; // simplified extended ISO formatted date
        modified: string; // simplified extended ISO formatted date 
    }
}

Why Will This Benefit The Community?

This will allow us to start creating articles.

@LamboCreeper LamboCreeper added accepted The issue is accepted and PRs are welcome enhancement New feature or request labels May 30, 2022
@LamboCreeper LamboCreeper added this to the Articles milestone May 30, 2022
@LamboCreeper LamboCreeper self-assigned this Jul 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted The issue is accepted and PRs are welcome enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant