INNER CODE UNIT · JavaScript

changePort

shadowsocks/shadowsocks-manager · plugins/account/index.js:88

const changePort = async (id, port) => {
  const result = await knex('account_plugin').update({ port }).where({ id });
  await accountFlow.edit(id);
};

const getAccount = async (options = {}) => {
  const where = {};
  if(options.id) {
    where['account_plugin.id'] = options.id;
  }
  if(options.userId) {
    where['user.id'] = options.userId;
  }
  if(options.port) {
    where['account_plugin.port'] = options.port;
  }
  if(options.group >= 0) {
    where['user.group'] = options.group;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…