diff --git a/functions/auth/login.js b/functions/auth/login/index.js similarity index 94% rename from functions/auth/login.js rename to functions/auth/login/index.js index 4faaa09..59462df 100644 --- a/functions/auth/login.js +++ b/functions/auth/login/index.js @@ -1,9 +1,9 @@ -const { prisma } = require('../prisma'); -const LnurlService = require('./services/lnurl.service') +const { prisma } = require('../../prisma'); +const LnurlService = require('../services/lnurl.service') const cookie = require('cookie') const jose = require('jose'); -const { CONSTS } = require('../utils'); +const { CONSTS } = require('../../utils'); async function generateAuthUrl() { diff --git a/functions/auth/logout.js b/functions/auth/logout/index.js similarity index 100% rename from functions/auth/logout.js rename to functions/auth/logout/index.js diff --git a/serverless.yml b/serverless.yml index d0b5d9d..cfd9757 100644 --- a/serverless.yml +++ b/serverless.yml @@ -23,7 +23,7 @@ functions: method: get cors: true login: - handler: functions/auth/login.handler + handler: functions/auth/login/index.handler events: - http: path: auth/login @@ -34,7 +34,7 @@ functions: method: get cors: true logout: - handler: functions/auth/logout.handler + handler: functions/auth/logout/index.handler events: - http: path: auth/logout