From 5aa3ea5e49b3170d60ab6ed311762c1c295d09c7 Mon Sep 17 00:00:00 2001 From: mykhailo-vaskivnyuk Date: Wed, 7 Feb 2024 10:08:26 +0200 Subject: [PATCH] feat: initial commit --- application/api/account/login.js | 13 +++++++++++++ application/api/account/signup.js | 13 +++++++++++++ application/api/router.1.js | 7 +++++++ application/domain/repository.js | 3 +++ 4 files changed, 36 insertions(+) create mode 100644 application/api/account/login.js create mode 100644 application/api/account/signup.js create mode 100644 application/api/router.1.js create mode 100644 application/domain/repository.js diff --git a/application/api/account/login.js b/application/api/account/login.js new file mode 100644 index 0000000..6ed5bd1 --- /dev/null +++ b/application/api/account/login.js @@ -0,0 +1,13 @@ +({ + access: 'public', + + parameters: { + token: 'string', + }, + + method: ({ token }) => { + return token; + }, + + returns: 'string', +}); diff --git a/application/api/account/signup.js b/application/api/account/signup.js new file mode 100644 index 0000000..32b9381 --- /dev/null +++ b/application/api/account/signup.js @@ -0,0 +1,13 @@ +({ + access: 'public', + + parameters: { + email: 'string', + }, + + method: ({ email }) => { + return email; + }, + + returns: 'string', +}); diff --git a/application/api/router.1.js b/application/api/router.1.js new file mode 100644 index 0000000..b8e7f5e --- /dev/null +++ b/application/api/router.1.js @@ -0,0 +1,7 @@ +({ + router({ method, args, verb, headers }) { + const ip = context.client.ip; + console.log({ method, args, ip, verb, headers }); + return args; + }, +}); diff --git a/application/domain/repository.js b/application/domain/repository.js new file mode 100644 index 0000000..90d94b4 --- /dev/null +++ b/application/domain/repository.js @@ -0,0 +1,3 @@ +async () => { + return {}; +};