Skip to content

Commit

Permalink
fea:t メッセージ更新用 API の定義
Browse files Browse the repository at this point in the history
  • Loading branch information
rito528 committed Nov 1, 2024
1 parent f3efde1 commit fbc616b
Showing 1 changed file with 32 additions and 11 deletions.
43 changes: 32 additions & 11 deletions src/endpoints/messages.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ namespace Messages {
@body body: {
id: uint32;
};
@header header: {
Location: string;
};
} | {
@statusCode statusCode: 400 | 401 | 403 | 500;
@body body: Error;
Expand All @@ -48,16 +51,34 @@ namespace Messages {
@body body: Error;
};

@delete
@route("/{message_id}")
@summary("メッセージの削除")
op delete(
@path
message_id: uint32,
): {
@statusCode statusCode: 204;
} | {
@statusCode statusCode: 400 | 401 | 403 | 500;
@body body: Error;
};
namespace InvidualMessage {
@patch
@summary("メッセージの更新")
op update(
@path
message_id: uint32,

@body body: {
body: string;
},
): {
@statusCode statusCode: 204;
} | {
@statusCode statusCode: 400 | 401 | 403 | 500;
@body body: Error;
};

@delete
@summary("メッセージの削除")
op delete(
@path
message_id: uint32,
): {
@statusCode statusCode: 204;
} | {
@statusCode statusCode: 400 | 401 | 403 | 500;
@body body: Error;
};
}
}

0 comments on commit fbc616b

Please sign in to comment.