mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-02 11:15:35 +03:00
Updated removeUserData
This commit is contained in:
parent
e5aeb71f8e
commit
6cdbc823d4
@ -193,10 +193,7 @@ export const updateUserData = userData =>
|
|||||||
export const removeUserData = username =>
|
export const removeUserData = username =>
|
||||||
new Promise((resolve, reject) => {
|
new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
const account = Object.assign(
|
const account = Array.from(realm.objects(USER_SCHEMA).filtered('username = $0', username));
|
||||||
[],
|
|
||||||
Array.from(realm.objects(USER_SCHEMA).filtered('username = $0', username)),
|
|
||||||
);
|
|
||||||
if (convertToArray(account).length > 0) {
|
if (convertToArray(account).length > 0) {
|
||||||
realm.write(() => {
|
realm.write(() => {
|
||||||
realm.delete(account);
|
realm.delete(account);
|
||||||
|
Loading…
Reference in New Issue
Block a user