Socket
Socket
Sign inDemoInstall

@pasabi/api-rest-comments-tags-flags

Package Overview
Dependencies
Maintainers
7
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pasabi/api-rest-comments-tags-flags - npm Package Compare versions

Comparing version 0.9.16 to 0.9.17

7

dist/routes/flags/index.js

@@ -50,7 +50,8 @@ "use strict";

};
const success = await flagsService.create(flag);
const response = await flagsService.create(flag);
// TODO theoretically add a linter rule to check for auditedActivity in a post / put / patch / delete
// TODO - add auditing here
// ctx.auditedActivity = { verb: "add-flag", objects: [], target: {entityId, entityType}};
if (success == true) {
if (response.success == true) {
flag._id = response.id;
// should the callback add to the ctx.auditedActivity

@@ -60,3 +61,3 @@ addFlagCallback(flag, ctx);

ctx.payload = {
success,
success: response.success,
};

@@ -63,0 +64,0 @@ return next();

@@ -1,4 +0,5 @@

import { Collection, Db } from "mongodb";
import { Collection, Db, ObjectId } from "mongodb";
import UsersService from "../../services/users";
export interface FlagData {
_id?: ObjectId;
reason_id: string;

@@ -24,5 +25,8 @@ id: string;

reasonForId(id: string): Promise<import("bson").Document>;
create(flagIn: FlagData): Promise<boolean>;
create(flagIn: FlagData): Promise<{
id: ObjectId;
success: boolean;
}>;
findFlagsForEntity(entityType: string, entityId: string): Promise<import("bson").Document[]>;
}
//# sourceMappingURL=index.d.ts.map

@@ -52,3 +52,3 @@ "use strict";

const result = await this.flagsCollection.insertOne(flag);
return result.acknowledged;
return { id: result.insertedId, success: result.acknowledged };
}

@@ -55,0 +55,0 @@ async findFlagsForEntity(entityType, entityId) {

{
"name": "@pasabi/api-rest-comments-tags-flags",
"version": "0.9.16",
"version": "0.9.17",
"description": "Rest APIs for Comments, Tags and Flags",

@@ -46,3 +46,3 @@ "keywords": [

},
"gitHead": "84697f2375d64668fb012280811fa65d93be658a"
"gitHead": "0b3d1256cdb6f403d95152f3123de574e30a18b6"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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