webfast 0.1.65 → 0.1.67
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.
@@ -57,7 +57,7 @@ module.exports = async function(program,message,id,buttons) {
|
|
57
57
|
|
58
58
|
// Save to send so we can have the id and do things
|
59
59
|
madeRequest.result.uuid = program.uuid.v4();
|
60
|
-
let saveSend = await program.modules.data.findOrCreate(
|
60
|
+
let saveSend = await program.modules.data.findOrCreate(process.env.dbName,`send`,{
|
61
61
|
message_id : madeRequest.result.message_id
|
62
62
|
},madeRequest.result);
|
63
63
|
|
@@ -47,7 +47,7 @@ module.exports = async function(program,folder) {
|
|
47
47
|
}
|
48
48
|
middleValue.chat.ts = Date.now();
|
49
49
|
middleValue.chat.uuid = program.uuid.v4();
|
50
|
-
let user = await program.modules.data.findOrCreate(
|
50
|
+
let user = await program.modules.data.findOrCreate(process.env.dbName,`telegram`,{
|
51
51
|
id : middleValue.from.id
|
52
52
|
},middleValue.chat);
|
53
53
|
let typeOFF = typeof user;
|
@@ -71,7 +71,7 @@ module.exports = async function(program,folder) {
|
|
71
71
|
|
72
72
|
// Find or create to add message to db
|
73
73
|
body.uuid = program.uuid.v4();
|
74
|
-
let received = await program.modules.data.findOrCreate(
|
74
|
+
let received = await program.modules.data.findOrCreate(process.env.dbName,`received`,{
|
75
75
|
update_id : body.update_id
|
76
76
|
},body);
|
77
77
|
|
@@ -99,7 +99,7 @@ module.exports = async function(program,folder) {
|
|
99
99
|
const id = member.id;
|
100
100
|
console.log(`Something with member`);
|
101
101
|
|
102
|
-
const updated =await program.modules.data.update(
|
102
|
+
const updated =await program.modules.data.update(process.env.dbName,`telegram`,{
|
103
103
|
id : id
|
104
104
|
},{
|
105
105
|
$set: {
|
@@ -55,7 +55,7 @@ module.exports = async function(db,collection,query,one = false,array) {
|
|
55
55
|
|
56
56
|
// Check if profile image to get it from db
|
57
57
|
if (result.profileImage != undefined && array.image == true) {
|
58
|
-
const profileImage = await program.modules.data.file.downloadBuffer(result.profileImage
|
58
|
+
const profileImage = await program.modules.data.file.downloadBuffer(result.profileImage,process.env.dbName);
|
59
59
|
|
60
60
|
// Set in dynamic routing for serving
|
61
61
|
let sizeMeta = {};
|
package/modules/express/init.js
CHANGED
@@ -292,7 +292,7 @@ module.exports = async function (program) {
|
|
292
292
|
if (parsedQuery.user != undefined) {
|
293
293
|
// Get user
|
294
294
|
const userJSON = JSON.parse(JSON.parse(parsedQuery.user));
|
295
|
-
getUser = await program.modules.data.find(
|
295
|
+
getUser = await program.modules.data.find(process.env.dbName,`telegram`,{
|
296
296
|
id : userJSON.id
|
297
297
|
},true,{image:true,program,async function(program,json){
|
298
298
|
// Get firs timage
|