After some internal (with myself) debate, we will go with JSON.

It just makes much more sense, to build a decent and modern
platform.
main
absc 2024-08-04 13:54:46 +02:00
parent 96781451b0
commit 2b995f67c8
3 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@ ERLC?= erlc -server
OBJS= dudeswave.beam dudeswave_app.beam OBJS= dudeswave.beam dudeswave_app.beam
OBJS+= dudeswave_supervisor.beam dudeswave_handler.beam OBJS+= dudeswave_supervisor.beam dudeswave_handler.beam
OBJS+= dudeswave_newuser_handler.beam OBJS+= dudeswave_user_handler.beam
all: ${OBJS} all: ${OBJS}

View File

@ -37,7 +37,7 @@ start(_Type, StartArgs) ->
Dispatch = cowboy_router:compile([ Dispatch = cowboy_router:compile([
{'_', [ {'_', [
{"/user/new", dudeswave_newuser_handler, #{bucket => ?USERSBUCKET}}, {"/user", dudeswave_newuser_handler, #{bucket => ?USERSBUCKET}},
{"/", dudeswave_handler, #{bucket => ?APPBUCKET}} {"/", dudeswave_handler, #{bucket => ?APPBUCKET}}
]} ]}
]), ]),

View File

@ -13,9 +13,9 @@
% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF % ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. % OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
% %
-module(dudeswave_newuser_handler). -module(dudeswave_user_handler).
-moduledoc """ -moduledoc """
Register a new user. JSON API to manage users.
""". """.
-behaviour(cowboy_handler). -behaviour(cowboy_handler).