julianlam / nodebb-plugin-sso-facebook

Single Sign-On Plugin for NodeBB
BSD 2-Clause "Simplified" License
19 stars 19 forks source link

What's the difference between the /api/admin and /admin? #57

Closed KashingLiu closed 2 years ago

KashingLiu commented 2 years ago

https://github.com/julianlam/nodebb-plugin-sso-facebook/blob/9bee11630a70c630c0e727d507b2017c96aaee43/library.js#L37-L38

It seems that only use /admin cannot reach the correct page. After I add params.router.get('/api/admin/'), it works.

When I click the login button, will it calls /admin firstly and then calls /api/admin?

julianlam commented 2 years ago

Likely you need to ./nodebb build.

The first renders the actual page. The second, only the json data.