forked from elrumo/macOS_Big_Sur_icons_replacements
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added announcement message to home screen
- Loading branch information
Showing
24 changed files
with
10,565 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
const Parse = require('parse/node'); | ||
require('dotenv').config(); | ||
|
||
const VITE_PARSE_APP_ID = process.env.VITE_PARSE_APP_ID | ||
const VITE_PARSE_JAVASCRIPT_KEY = process.env.VITE_PARSE_JAVASCRIPT_KEY | ||
const VITE_PARSE_URL = process.env.VITE_PARSE_URL | ||
const MASTER_KEY = process.env.MASTER_KEY | ||
|
||
Parse.initialize(VITE_PARSE_APP_ID, VITE_PARSE_JAVASCRIPT_KEY, MASTER_KEY) | ||
Parse.serverURL = VITE_PARSE_URL | ||
|
||
|
||
async function changeUserNames() { | ||
const queryUser = new Parse.Query(Parse.User); | ||
queryUser.doesNotExist("nameToShow"); | ||
queryUser.ascending("createdAt"); | ||
queryUser.limit(500); | ||
console.log(await queryUser.count()); | ||
let userInfo = await queryUser.find(); | ||
|
||
let errorUsernames = [] | ||
|
||
userInfo.forEach((user) => { | ||
let originalUsername = user.get('username'); | ||
let username = user.get('username'); | ||
|
||
user.set('nameToShow', username); | ||
|
||
username = username.replaceAll(' ', '_') | ||
username = username.toLowerCase() | ||
|
||
user.set('username', username); | ||
user.save(null, { useMasterKey: true }).then((data) =>{ | ||
console.log(data); | ||
}).catch((error)=>{ | ||
errorUsernames.push(username) | ||
console.log(error, originalUsername); | ||
console.log("errorUsernames: ", originalUsername); | ||
}) | ||
}) | ||
|
||
} | ||
|
||
changeUserNames() |
Oops, something went wrong.