mirror of
https://github.com/arcan1s/ffxivbis.git
synced 2025-04-24 17:27: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(),
|
||||
permission: "admin",
|
||||
}),
|
||||
type: "PUT",
|
||||
type: "POST",
|
||||
contentType: "application/json",
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
|
@ -49,5 +49,5 @@ class Swagger(config: Config) extends SwaggerHttpService {
|
||||
override val securitySchemes: Map[String, SecurityScheme] = Map("basic" -> basicAuth)
|
||||
|
||||
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
|
||||
|
||||
@PUT
|
||||
@POST
|
||||
@Path("party")
|
||||
@Consumes(value = Array("application/json"))
|
||||
@Operation(
|
||||
@ -76,7 +76,7 @@ class UserEndpoint(override val storage: ActorRef[Message], override val auth: A
|
||||
def createParty: Route =
|
||||
path("party") {
|
||||
extractExecutionContext { implicit executionContext =>
|
||||
put {
|
||||
post {
|
||||
entity(as[UserModel]) { user =>
|
||||
onSuccess(newPartyId) { partyId =>
|
||||
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 entity = UserModel.fromUser(Fixtures.userAdmin).copy(password = Fixtures.userPassword)
|
||||
|
||||
Put(uri, entity) ~> route ~> check {
|
||||
Post(uri, entity) ~> route ~> check {
|
||||
status shouldEqual StatusCodes.OK
|
||||
partyId = responseAs[PartyIdModel].partyId
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user