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

@hydrooj/center

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hydrooj/center - npm Package Compare versions

Comparing version 0.0.2 to 0.0.3

0

handler.d.ts

@@ -0,0 +0,0 @@ declare module 'hydrooj/dist/interface' {

8

handler.js

@@ -36,5 +36,5 @@ "use strict";

}
async post(domainId, instanceId, _payload) {
async post(domainId, installId, _payload) {
const payload = js_yaml_1.default.load(decrypt(_payload));
await coll.updateOne({ _id: instanceId }, {
await coll.updateOne({ _id: installId }, {
$set: {

@@ -74,3 +74,3 @@ version: payload.version,

if (res instanceof Error)
throw new error_1.RemoteOnlineJudgeError(res.message);
throw new error_1.RemoteOnlineJudgeError(`[Post Target/Send/Info] ${res.message}`);
res = await superagent_1.default.post(`${endpoint}/problem/receive`).send({

@@ -80,3 +80,3 @@ operation: 'request', url: `${url}d/${domainId}/problem/send`, tokenId, expire,

if (res instanceof Error)
throw new error_1.RemoteOnlineJudgeError(res.message);
throw new error_1.RemoteOnlineJudgeError(`[Post Target/Receive/Request] ${res.message}`);
this.response.body = { code: 0 };

@@ -83,0 +83,0 @@ }

@@ -66,7 +66,7 @@ import db from 'hydrooj/dist/service/db';

.catch((e) => e);
if (res instanceof Error) throw new RemoteOnlineJudgeError(res.message);
if (res instanceof Error) throw new RemoteOnlineJudgeError(`[Post Target/Send/Info] ${res.message}`);
res = await superagent.post(`${endpoint}/problem/receive`).send({
operation: 'request', url: `${url}d/${domainId}/problem/send`, tokenId, expire,
}).catch((e) => e);
if (res instanceof Error) throw new RemoteOnlineJudgeError(res.message);
if (res instanceof Error) throw new RemoteOnlineJudgeError(`[Post Target/Receive/Request] ${res.message}`);
this.response.body = { code: 0 };

@@ -73,0 +73,0 @@ }

{
"name": "@hydrooj/center",
"version": "0.0.2",
"version": "0.0.3",
"main": "package.json",
"repository": "https://github.com/hydro-dev/Hydro.git",
"author": "undefined <i@undefined.moe>",
"license": "MIT",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {

@@ -9,0 +9,0 @@ "js-yaml": "^4.1.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