mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
db
This commit is contained in:
parent
cd567cd304
commit
e00b565b15
@ -15,7 +15,7 @@ const uniqueImageUrl = (imageUrl) => {
|
||||
return newUrl.toString()
|
||||
}
|
||||
|
||||
export const cleanDatabase = async (options = {}) => {
|
||||
export const cleanDatabase = async (options: any = {}) => {
|
||||
const { driver = getDriver() } = options
|
||||
const session = driver.session()
|
||||
try {
|
||||
|
||||
@ -18,13 +18,13 @@ export function up(next) {
|
||||
rxSession
|
||||
.beginTransaction()
|
||||
.pipe(
|
||||
flatMap((txc) =>
|
||||
flatMap((txc: any) =>
|
||||
concat(
|
||||
txc
|
||||
.run('MATCH (email:EmailAddress) RETURN email {.email}')
|
||||
.records()
|
||||
.pipe(
|
||||
map((record) => {
|
||||
map((record: any) => {
|
||||
const { email } = record.get('email')
|
||||
const normalizedEmail = normalizeEmail(email)
|
||||
return { email, normalizedEmail }
|
||||
@ -45,7 +45,7 @@ export function up(next) {
|
||||
)
|
||||
.records()
|
||||
.pipe(
|
||||
map((r) => ({
|
||||
map((r: any) => ({
|
||||
oldEmail: email,
|
||||
email: r.get('email'),
|
||||
user: r.get('user'),
|
||||
|
||||
@ -12,7 +12,7 @@ export function up(next) {
|
||||
rxSession
|
||||
.beginTransaction()
|
||||
.pipe(
|
||||
flatMap((transaction) =>
|
||||
flatMap((transaction: any) =>
|
||||
concat(
|
||||
transaction
|
||||
.run(
|
||||
@ -23,7 +23,7 @@ export function up(next) {
|
||||
)
|
||||
.records()
|
||||
.pipe(
|
||||
map((record) => {
|
||||
map((record: any) => {
|
||||
const { id: locationId } = record.get('location')
|
||||
return { locationId }
|
||||
}),
|
||||
@ -40,7 +40,7 @@ export function up(next) {
|
||||
)
|
||||
.records()
|
||||
.pipe(
|
||||
map((record) => ({
|
||||
map((record: any) => ({
|
||||
location: record.get('location'),
|
||||
updatedLocation: record.get('updatedLocation'),
|
||||
})),
|
||||
|
||||
@ -3,7 +3,7 @@ import { existsSync, createReadStream } from 'fs'
|
||||
import path from 'path'
|
||||
import { S3 } from 'aws-sdk'
|
||||
import mime from 'mime-types'
|
||||
import { s3Configs } from '../../config'
|
||||
import s3Configs from '../../config'
|
||||
import https from 'https'
|
||||
|
||||
export const description = `
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user