Vovchikan
How to remove PUT method from phx.routes?
Phoenix version - 1.6.6
My phoenix routes:
swagger_ui_path GET /getmsg/swaggerui OpenApiSpex.Plug.SwaggerUI [path: "/getmsg/api/openapi"]
render_spec_path GET /getmsg/api/openapi OpenApiSpex.Plug.RenderSpec []
auth_token_path POST /getmsg/api/auth-tokens GetmsgApi.AuthTokenController :create
message_path GET /getmsg/api/messages GetmsgApi.MessageController :index
message_path GET /getmsg/api/messages/:id GetmsgApi.MessageController :show
message_path PATCH /getmsg/api/messages/:id GetmsgApi.MessageController :update
PUT /getmsg/api/messages/:id GetmsgApi.MessageController :update
How to remove PUT method? I don’t need it.
Marked As Solved
rustyonetwo
Did this come up automatically using resources "/getmsg/api/messages", MessageController ? If so the PUT verb was generated automatically. You can avoid this by excluding the :update routes in the controller with resources "/getmsg/api/messages", MessageController, except: [:update] and then creating another route with patch "/getmsg/api/messages", MessageController, :update. If you’re not getting that by using resources then we’d probably need to take a look at the relevant part of your router.
3
Also Liked
LostKobrakai
This needs to be
patch "/getmsg/api/messages/:id", MessageController, :update
2
Popular in Questions
What is the proper way to load a module from a file in to IEX?
In the python world, doing something like this pretty standard:
from ....
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
Hi,
I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New
I will often find my self writing things similar to:
case some_value do
nil -> something()
"" -> something()
_ -> someth...
New
Can someone explain the settings of pool_size of Ecto in config file? and what is the recommend size?
Thanks
New
Expanding on this topic: https://forum.elixirforum.net/t/map-typespec-question/19217
Let’s say I have a map with required and optional k...
New
Other popular topics
Hi! May someone helps me, please!
I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
What is the proper way to load a module from a file in to IEX?
In the python world, doing something like this pretty standard:
from ....
New
Credo is smart enough to check for (something like) this:
assert length(the_list) == 0
with this response:
Checking if an enum is empt...
New
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Good day to you all.
I have been struggling to get a query involving like and ilike to work.
Can anyone assist me on this, please?
pro...
New
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service.
Currently when I de...
New
I have a User schema with a :from_id field set to type :string:
defmodule TweetBot.Repo.Migrations.CreateUsers do
use Ecto.Migration
...
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New







