New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hzt-im-wasm

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hzt-im-wasm

copy ....

  • 0.0.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

import { DatabaseErrorCode } from '../../constant'; import { batchInsertConversationUnreadMessageList as databaseBatchInsertConversationUnreadMessageList, deleteConversationUnreadMessageList as databaseDeleteConversationUnreadMessageList, getConversationUnreadMessageCount as databaseGetConversationUnreadMessageCount, } from '../../sqls'; import { convertToSnakeCaseObject, formatResponse } from '../../utils'; import { getInstance } from './instance'; export async function deleteConversationUnreadMessageList(conversationID, sendTime) { try { const db = await getInstance(); databaseDeleteConversationUnreadMessageList(db, conversationID, sendTime); const modifed = db.getRowsModified(); return formatResponse(modifed); } catch (e) { console.error(e); return formatResponse(undefined, DatabaseErrorCode.ErrorInit, JSON.stringify(e)); } } export async function batchInsertConversationUnreadMessageList(messageListStr) { try { const db = await getInstance(); const messageList = JSON.parse(messageListStr).map((v) => convertToSnakeCaseObject(v)); const execResult = databaseBatchInsertConversationUnreadMessageList(db, messageList); return formatResponse(execResult[0]); } catch (e) { console.error(e); return formatResponse(undefined, DatabaseErrorCode.ErrorInit, JSON.stringify(e)); } }

export async function getConversationUnreadMessageCount(conversationID) { try { const db = await getInstance(); const execResult = databaseGetConversationUnreadMessageCount(db, conversationID); return formatResponse(execResult[0]?.values[0]?.[0]); } catch (e) { console.error(e); return formatResponse(undefined, DatabaseErrorCode.ErrorInit, JSON.stringify(e)); } }

Keywords

FAQs

Package last updated on 07 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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