From d9ab25f7baa87546c8cba35965cf6ec4118ceec0 Mon Sep 17 00:00:00 2001 From: M3chD09 Date: Sat, 30 Jul 2022 02:04:07 +0000 Subject: [PATCH] add more api --- src/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/index.js b/src/index.js index 5ac75c6..609b166 100644 --- a/src/index.js +++ b/src/index.js @@ -4,6 +4,8 @@ const MS_GRAPH_VER = "1.0"; const MS_GRAPH_API_LIST = [ `${MS_GRAPH_ROOT}/v${MS_GRAPH_VER}/me`, `${MS_GRAPH_ROOT}/v${MS_GRAPH_VER}/me/drive`, + `${MS_GRAPH_ROOT}/v${MS_GRAPH_VER}/me/drive/recent`, + `${MS_GRAPH_ROOT}/v${MS_GRAPH_VER}/me/drive/sharedWithMe`, `${MS_GRAPH_ROOT}/v${MS_GRAPH_VER}/me/drive/root`, `${MS_GRAPH_ROOT}/v${MS_GRAPH_VER}/me/drive/root/children`, `${MS_GRAPH_ROOT}/v${MS_GRAPH_VER}/me/mailFolders`, @@ -223,6 +225,9 @@ async function fetchMSApi(url) { } function randomInt(min, max) { + if (min > max) { + return randomInt(max, min); + } return Math.floor(Math.random() * (max - min) + min); }