aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason <[email protected]>2021-11-03 13:17:34 +0000
committerGitHub <[email protected]>2021-11-03 22:17:34 +0900
commit25897ba6d36191a3dc8f6689d8b2ec5def0ba16d (patch)
treede868018ff4f7d66f8f0ce925d55aa8b2754353e
parentfix: update upload directories (diff)
downloadhost.fuwn.me-25897ba6d36191a3dc8f6689d8b2ec5def0ba16d.tar.xz
host.fuwn.me-25897ba6d36191a3dc8f6689d8b2ec5def0ba16d.zip
Allow API Access to some endpoints (#304)
-rw-r--r--src/api/routes/albums/albumPOST.js2
-rw-r--r--src/api/routes/albums/albumsGET.js2
-rw-r--r--src/api/routes/albums/link/linkPOST.js2
-rw-r--r--src/api/routes/files/albumAddPOST.js2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/api/routes/albums/albumPOST.js b/src/api/routes/albums/albumPOST.js
index 04cab1e..44efc4e 100644
--- a/src/api/routes/albums/albumPOST.js
+++ b/src/api/routes/albums/albumPOST.js
@@ -3,7 +3,7 @@ const Route = require('../../structures/Route');
class albumPOST extends Route {
constructor() {
- super('/album/new', 'post');
+ super('/album/new', 'post', { canApiKey: true });
}
async run(req, res, db, user) {
diff --git a/src/api/routes/albums/albumsGET.js b/src/api/routes/albums/albumsGET.js
index 98cc82e..345c6e3 100644
--- a/src/api/routes/albums/albumsGET.js
+++ b/src/api/routes/albums/albumsGET.js
@@ -4,7 +4,7 @@ const Util = require('../../utils/Util');
class albumsGET extends Route {
constructor() {
- super('/albums/mini', 'get');
+ super('/albums/mini', 'get', { canApiKey: true });
}
async run(req, res, db, user) {
diff --git a/src/api/routes/albums/link/linkPOST.js b/src/api/routes/albums/link/linkPOST.js
index 7bc8051..afa2505 100644
--- a/src/api/routes/albums/link/linkPOST.js
+++ b/src/api/routes/albums/link/linkPOST.js
@@ -3,7 +3,7 @@ const Util = require('../../../utils/Util');
class linkPOST extends Route {
constructor() {
- super('/album/link/new', 'post');
+ super('/album/link/new', 'post', { canApiKey: true });
}
async run(req, res, db, user) {
diff --git a/src/api/routes/files/albumAddPOST.js b/src/api/routes/files/albumAddPOST.js
index 645a6be..9dd8b9f 100644
--- a/src/api/routes/files/albumAddPOST.js
+++ b/src/api/routes/files/albumAddPOST.js
@@ -2,7 +2,7 @@ const Route = require('../../structures/Route');
class albumAddPOST extends Route {
constructor() {
- super('/file/album/add', 'post');
+ super('/file/album/add', 'post', { canApiKey: true });
}
async run(req, res, db, user) {