Skip to content

Commit

Permalink
Merge pull request #158 from GiganticMinecraft/feat/label
Browse files Browse the repository at this point in the history
回答につけられるラベルを置き換えるエンドポイントの定義
  • Loading branch information
rito528 authored Aug 23, 2024
2 parents c92a869 + 01c399a commit c16c0bb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/endpoints/forms.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,21 @@ namespace Forms {
@statusCode statusCode: 400 | 401 | 403 | 404 | 500;
@body body: Error;
};

@route("/labels")
@put
@summary("回答についているラベルの置き換え")
op replace(
@path answerId: uint32,
@body body: {
labels: Label[];
},
): {
@statusCode statusCode: 200;
} | {
@statusCode statusCode: 400 | 401 | 403 | 500;
@body body: Error;
};
}

@route("/comment")
Expand Down
1 change: 1 addition & 0 deletions src/models/form.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ model Answer {
timestamp: utcDateTime;
commented_by: User;
}[];
labels: Label[];
}

model Label {
Expand Down

0 comments on commit c16c0bb

Please sign in to comment.