Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hydrooj

Package Overview
Dependencies
Maintainers
1
Versions
1060
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hydrooj - npm Package Compare versions

Comparing version 2.13.33 to 2.13.34

10

dist/handler/domain.js

@@ -239,2 +239,5 @@ "use strict";

throw new error_1.ValidationError('role');
if (!current && expire === domain.JOIN_EXPIRATION_KEEP_CURRENT)
throw new error_1.ValidationError('expire');
joinSettings = { method, role };
if (expire === domain.JOIN_EXPIRATION_KEEP_CURRENT)

@@ -248,9 +251,6 @@ joinSettings.expire = current.expire;

joinSettings.expire = moment_timezone_1.default().add(expire, 'hours').toDate();
if (!current && expire === domain.JOIN_EXPIRATION_KEEP_CURRENT)
throw new error_1.ValidationError('expire');
joinSettings = { method, role };
if (method === domain.JOIN_METHOD_CODE)
joinSettings.code = invitationCode;
}
await domain.edit(this.domain._id, { join: joinSettings });
await domain.edit(domainId, { join: joinSettings });
this.back();

@@ -262,3 +262,3 @@ }

server_1.param('role', server_1.Types.String, true),
server_1.param('expire', server_1.Types.UnsignedInt, true),
server_1.param('expire', server_1.Types.Int, true),
server_1.param('invitationCode', server_1.Types.String, true)

@@ -265,0 +265,0 @@ ], DomainJoinApplicationsHandler.prototype, "post", null);

{
"name": "hydrooj",
"version": "2.13.33",
"version": "2.13.34",
"bin": "bin/hydrooj.js",

@@ -5,0 +5,0 @@ "main": "dist/loader.js",

@@ -215,3 +215,3 @@ import moment from 'moment-timezone';

@param('role', Types.String, true)
@param('expire', Types.UnsignedInt, true)
@param('expire', Types.Int, true)
@param('invitationCode', Types.String, true)

@@ -226,2 +226,4 @@ async post(domainId: string, method: number, role: string, expire: number, invitationCode = '') {

if (!roles.includes(role)) throw new ValidationError('role');
if (!current && expire === domain.JOIN_EXPIRATION_KEEP_CURRENT) throw new ValidationError('expire');
joinSettings = { method, role };
if (expire === domain.JOIN_EXPIRATION_KEEP_CURRENT) joinSettings.expire = current.expire;

@@ -231,7 +233,5 @@ else if (expire === domain.JOIN_EXPIRATION_UNLIMITED) joinSettings.expire = null;

else joinSettings.expire = moment().add(expire, 'hours').toDate();
if (!current && expire === domain.JOIN_EXPIRATION_KEEP_CURRENT) throw new ValidationError('expire');
joinSettings = { method, role };
if (method === domain.JOIN_METHOD_CODE) joinSettings.code = invitationCode;
}
await domain.edit(this.domain._id, { join: joinSettings });
await domain.edit(domainId, { join: joinSettings });
this.back();

@@ -238,0 +238,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc