streamby-core 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,6 +18,15 @@ function createStreamByRouter(config) {
18
18
  throw new Error('Unsupported storage type');
19
19
  }
20
20
  })();
21
+ router.get('/auth', async (req, res) => {
22
+ try {
23
+ const auth = await config.authProvider(req);
24
+ res.status(200).json({ logged: true, ...auth });
25
+ }
26
+ catch (err) {
27
+ res.status(401).json({ logged: false });
28
+ }
29
+ });
21
30
  router.get('/files', async (req, res) => {
22
31
  try {
23
32
  const auth = await config.authProvider(req);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "streamby-core",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "StreamBy middleware framework for media storage management",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",