@rpcbase/server 0.210.0 → 0.212.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpcbase/server",
3
- "version": "0.210.0",
3
+ "version": "0.212.0",
4
4
  "license": "SSPL-1.0",
5
5
  "main": "./index.js",
6
6
  "bin": {
package/rts/index.js CHANGED
@@ -265,16 +265,14 @@ const add_change_stream = (mongoose, socket_id, {model_name, query, query_key, o
265
265
  const run_query = async(mongoose, socket_id, {model_name, query, query_key, options}) => {
266
266
  const model = mongoose.model(model_name)
267
267
 
268
- if (options) {
269
- log("options", options)
270
- }
268
+ log("run_query", {model_name, query, query_key, options})
271
269
 
272
270
  if (!query) throw new Error("run_query empty query")
273
271
 
274
272
  const s = _sockets[socket_id]
275
273
  const ctx = {req: s.request}
276
274
 
277
- log("initial run_query AUTH", ctx.req.session.user_id)
275
+ // log("initial run_query AUTH", ctx.req.session.user_id)
278
276
  if (!ctx.req.session.user_id) {
279
277
  // TODO: retry in node16! why is the throw not caught in try catch block
280
278
  // throw new Error("no user ID for client query")
@@ -2,14 +2,25 @@
2
2
  const mongoose = require("../../mongoose")
3
3
 
4
4
  const UserSchema = new mongoose.Schema({
5
- name: {
5
+ email: String,
6
+ first_name: {
6
7
  type: String,
7
8
  default: "",
8
9
  },
9
- avatar_url: {
10
+ last_name: {
11
+ type: String,
12
+ default: "",
13
+ },
14
+ initials: {
15
+ type: String,
16
+ default: "",
17
+ },
18
+ avatar_image: {
19
+ type: String,
20
+ },
21
+ avatar_color: {
10
22
  type: String,
11
23
  },
12
- email: String,
13
24
  is_email_verified: {
14
25
  type: Boolean,
15
26
  default: false,