mirror of
https://github.com/sub-store-org/Sub-Store.git
synced 2025-08-10 00:52:40 +00:00
feat (restful): Add /api/utils/refresh
The API call does the following: - Fetch GitHub avatar and update artifact store url - Revoke all cached resources
This commit is contained in:
@@ -28,7 +28,7 @@ async function updateSettings(req, res) {
|
||||
success(res, newSettings);
|
||||
}
|
||||
|
||||
async function updateGitHubAvatar() {
|
||||
export async function updateGitHubAvatar() {
|
||||
const settings = $.read(SETTINGS_KEY);
|
||||
const username = settings.githubUser;
|
||||
if (username) {
|
||||
@@ -50,7 +50,7 @@ async function updateGitHubAvatar() {
|
||||
}
|
||||
}
|
||||
|
||||
async function updateArtifactStore() {
|
||||
export async function updateArtifactStore() {
|
||||
$.log('Updating artifact store');
|
||||
const settings = $.read(SETTINGS_KEY);
|
||||
const { githubUser, gistToken } = settings;
|
||||
|
||||
Reference in New Issue
Block a user