fix(e2e): storage import
This commit is contained in:
parent
c42c629475
commit
e22aed56af
3 changed files with 8 additions and 0 deletions
|
@ -1,3 +1,5 @@
|
||||||
|
const { MemoryStorage } = require('@mtcute/core/storage/memory.js')
|
||||||
|
|
||||||
exports.getApiParams = () => {
|
exports.getApiParams = () => {
|
||||||
if (!process.env.API_ID || !process.env.API_HASH) {
|
if (!process.env.API_ID || !process.env.API_HASH) {
|
||||||
throw new Error('API_ID and API_HASH env variables must be set')
|
throw new Error('API_ID and API_HASH env variables must be set')
|
||||||
|
@ -7,5 +9,6 @@ exports.getApiParams = () => {
|
||||||
apiId: parseInt(process.env.API_ID),
|
apiId: parseInt(process.env.API_ID),
|
||||||
apiHash: process.env.API_HASH,
|
apiHash: process.env.API_HASH,
|
||||||
testMode: true,
|
testMode: true,
|
||||||
|
storage: new MemoryStorage(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
import { MemoryStorage } from '@mtcute/core/storage/memory.js'
|
||||||
|
|
||||||
export const getApiParams = () => {
|
export const getApiParams = () => {
|
||||||
if (!process.env.API_ID || !process.env.API_HASH) {
|
if (!process.env.API_ID || !process.env.API_HASH) {
|
||||||
throw new Error('API_ID and API_HASH env variables must be set')
|
throw new Error('API_ID and API_HASH env variables must be set')
|
||||||
|
@ -7,5 +9,6 @@ export const getApiParams = () => {
|
||||||
apiId: parseInt(process.env.API_ID),
|
apiId: parseInt(process.env.API_ID),
|
||||||
apiHash: process.env.API_HASH,
|
apiHash: process.env.API_HASH,
|
||||||
testMode: true,
|
testMode: true,
|
||||||
|
storage: new MemoryStorage(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import { BaseTelegramClientOptions } from '@mtcute/core'
|
import { BaseTelegramClientOptions } from '@mtcute/core'
|
||||||
|
import { MemoryStorage } from '@mtcute/core/storage/memory.js'
|
||||||
|
|
||||||
export const getApiParams = (): BaseTelegramClientOptions => {
|
export const getApiParams = (): BaseTelegramClientOptions => {
|
||||||
if (!process.env.API_ID || !process.env.API_HASH) {
|
if (!process.env.API_ID || !process.env.API_HASH) {
|
||||||
|
@ -9,5 +10,6 @@ export const getApiParams = (): BaseTelegramClientOptions => {
|
||||||
apiId: parseInt(process.env.API_ID),
|
apiId: parseInt(process.env.API_ID),
|
||||||
apiHash: process.env.API_HASH,
|
apiHash: process.env.API_HASH,
|
||||||
testMode: true,
|
testMode: true,
|
||||||
|
storage: new MemoryStorage(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue