diff --git a/api/src/api.js b/api/src/api.js index 79849fc..24036e5 100644 --- a/api/src/api.js +++ b/api/src/api.js @@ -1,5 +1,5 @@ module.exports = { url: require('./api-utils.js').url, - accounts: require('./api/accounts.js'), + auth: require('./api/auth.js'), feed: require('./api/feed.js'), } diff --git a/api/src/api/accounts.js b/api/src/api/auth.js similarity index 100% rename from api/src/api/accounts.js rename to api/src/api/auth.js diff --git a/api/src/server.js b/api/src/server.js index 68b634c..f6860f3 100644 --- a/api/src/server.js +++ b/api/src/server.js @@ -66,8 +66,8 @@ app.on('apex-outbox', activity.federation.outbox) app.on('apex-inbox', activity.federation.inbox) // API defines -app.route(api.url('/accounts/register')).post(api.accounts.register.post) -app.route(api.url('/accounts/login')).post(api.accounts.login.post) +app.route(api.url('/auth/register')).post(api.auth.register.post) +app.route(api.url('/auth/login')).post(api.auth.login.post) app.route(api.url('/feed/meet')).get(api.feed.meet.get) diff --git a/web/src/public/login.php b/web/src/public/login.php index 689b003..0e47d45 100644 --- a/web/src/public/login.php +++ b/web/src/public/login.php @@ -27,7 +27,7 @@ function loginAction(e) { email: e.target.querySelector('*[name="email"]').value, password: e.target.querySelector('*[name="password"]').value, }; - http.post('/api/v1/accounts/login', payload, function(json) { + http.post('/api/v1/auth/login', payload, function(json) { if (json.error !== undefined) console.error('TODO: to-screen: '+json.error); else if (json.result !== undefined && json.result === 1)