mirror of
https://github.com/arcan1s/ffxivbis.git
synced 2025-04-25 01:37:17 +00:00
change PUT to POST for party creation request
This commit is contained in:
parent
d4553b2e50
commit
d3018998cd
@ -124,7 +124,7 @@
|
|||||||
password: passwordInput.val(),
|
password: passwordInput.val(),
|
||||||
permission: "admin",
|
permission: "admin",
|
||||||
}),
|
}),
|
||||||
type: "PUT",
|
type: "POST",
|
||||||
contentType: "application/json",
|
contentType: "application/json",
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
|
@ -49,5 +49,5 @@ class Swagger(config: Config) extends SwaggerHttpService {
|
|||||||
override val securitySchemes: Map[String, SecurityScheme] = Map("basic" -> basicAuth)
|
override val securitySchemes: Map[String, SecurityScheme] = Map("basic" -> basicAuth)
|
||||||
|
|
||||||
override val unwantedDefinitions: Seq[String] =
|
override val unwantedDefinitions: Seq[String] =
|
||||||
Seq("Function1", "Function1RequestContextFutureRouteResult")
|
Seq("Function1", "Function1RequestContextFutureRouteResult", "SeqLootModel", "SeqPieceModel")
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ class UserEndpoint(override val storage: ActorRef[Message], override val auth: A
|
|||||||
|
|
||||||
def routes: Route = createParty ~ createUser ~ deleteUser ~ getUsers ~ getUsersCurrent
|
def routes: Route = createParty ~ createUser ~ deleteUser ~ getUsers ~ getUsersCurrent
|
||||||
|
|
||||||
@PUT
|
@POST
|
||||||
@Path("party")
|
@Path("party")
|
||||||
@Consumes(value = Array("application/json"))
|
@Consumes(value = Array("application/json"))
|
||||||
@Operation(
|
@Operation(
|
||||||
@ -76,7 +76,7 @@ class UserEndpoint(override val storage: ActorRef[Message], override val auth: A
|
|||||||
def createParty: Route =
|
def createParty: Route =
|
||||||
path("party") {
|
path("party") {
|
||||||
extractExecutionContext { implicit executionContext =>
|
extractExecutionContext { implicit executionContext =>
|
||||||
put {
|
post {
|
||||||
entity(as[UserModel]) { user =>
|
entity(as[UserModel]) { user =>
|
||||||
onSuccess(newPartyId) { partyId =>
|
onSuccess(newPartyId) { partyId =>
|
||||||
val admin = user.toUser.copy(partyId = partyId, permission = Permission.admin)
|
val admin = user.toUser.copy(partyId = partyId, permission = Permission.admin)
|
||||||
|
@ -50,7 +50,7 @@ class UserEndpointTest extends AnyWordSpecLike with Matchers with ScalatestRoute
|
|||||||
val uri = Uri(s"/party")
|
val uri = Uri(s"/party")
|
||||||
val entity = UserModel.fromUser(Fixtures.userAdmin).copy(password = Fixtures.userPassword)
|
val entity = UserModel.fromUser(Fixtures.userAdmin).copy(password = Fixtures.userPassword)
|
||||||
|
|
||||||
Put(uri, entity) ~> route ~> check {
|
Post(uri, entity) ~> route ~> check {
|
||||||
status shouldEqual StatusCodes.OK
|
status shouldEqual StatusCodes.OK
|
||||||
partyId = responseAs[PartyIdModel].partyId
|
partyId = responseAs[PartyIdModel].partyId
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user