Submission buttons working?
This commit is contained in:
parent
2a04efb10b
commit
aea340fe97
@ -6,9 +6,33 @@ interface ReviewButton {
|
||||
color: ButtonOwnProps["color"]
|
||||
}
|
||||
|
||||
// CREATE:
|
||||
// curl -H 'Content-Type: application/json' \
|
||||
// --cookie "session_id=123" \
|
||||
// -d '{"ID":0,"DisplayName":"Example Map","Creator":"Quaternions","GameID":1,"Date":"2024-12-09T20:43:49.957660142-08:00","Submitter":52250025,"AssetID":255299419,"AssetVersion":7,"Completed":true,"TargetAssetID":5692134283,"StatusID":0}' \
|
||||
// -X POST \
|
||||
// localhost:8081/v1/submissions
|
||||
|
||||
// GET:
|
||||
// curl -H 'Content-Type: application/json' \
|
||||
// --cookie "session_id=c5191ddc-eee1-4010-900c-6b2c7b6780ab" \
|
||||
// -X GET \
|
||||
// localhost:8081/v1/submissions/1
|
||||
|
||||
// SUBMIT:
|
||||
// curl -H 'Content-Type: application/json' \
|
||||
// --cookie "session_id=c5191ddc-eee1-4010-900c-6b2c7b6780ab" \
|
||||
// -X POST \
|
||||
// localhost:8081/v1/submissions/1/status/submit
|
||||
|
||||
function ReviewButtonClicked(type: Review) {
|
||||
//magical api requesting goes here, i hope it wont blow up
|
||||
console.log(type)
|
||||
const post = fetch(`http://localhost:8081/v1/submissions/1/status/${type.toLowerCase()}`, {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-type": "application/json",
|
||||
"Cookie": "session_id=c5191ddc-eee1-4010-900c-6b2c7b6780ab"
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function ReviewButton(props: ReviewButton) {
|
||||
|
Loading…
Reference in New Issue
Block a user