const Parse = require("parse/node")
Parse.serverURL = "https://web2023.fmode.cn/parse" // 配置服务器地址
Parse.initialize("dev") // 配置应用名称

async function registerAll() {
  // let query = Parse.Object.extend("LjUser");
  // // query.equalTo()
  // query.find().then((results) => {
  //   console.log(results);
  // }).catch((error) => {
  //   console.log(error);
  // });
  // let user = Parse.User.current();
  // // let User = Parse.Object.extend("LjUser");
  // // const user1 = new User();
  // // user1.set("account", "1");
  // // await user1.save();
  // const query = new Parse.Query("LjUser");
  // query.equalTo("account", "1");
  // console.log(query.first().then((result) => {
  //   console.log(1)
  //   console.log(result)
  // }));
//   const GameScore = Parse.Object.extend("LjUser");
//   const query = new Parse.Query(GameScore);
//   query.equalTo("account", "1");
//   const results = await query.find();
// // Do something with the returned Parse.Object values
//   for (let i = 0; i < results.length; i++) {
//     const object = results[i];
//     console.log(object)
//   }
  let userList = []

  let userQuery = new Parse.Query("LjUser");
  userQuery.equalTo("account", '123');
  let list = await userQuery.first();
  console.log(list)
  console.log(JSON.stringify(list))
  console.log(JSON.parse(JSON.stringify(list)).stuno)
  // query.get("VBy15Y4Fo2")
  //    .then((gameScore) => {
  //      console.log(gameScore.get("password"))
  //    }, (error) => {
  //      // The object was not retrieved successfully.
  //      // error is a Parse.Error with an error code and message.
  //    });
}

registerAll()