mirror of
https://github.com/filecoin-project/slate.git
synced 2024-12-26 18:44:56 +03:00
adds method to get libp2p tokens back when user accounts are deleted from Slate
This commit is contained in:
parent
36ebf5a823
commit
83ba2b6a85
@ -69,12 +69,17 @@ import getEverySlate from "~/node_common/data/methods/get-every-slate";
|
||||
import getEveryUser from "~/node_common/data/methods/get-every-user";
|
||||
|
||||
// NOTE(jim):
|
||||
// Deals
|
||||
// one-offs
|
||||
import getAllDeals from "~/node_common/data/methods/get-all-deals";
|
||||
import createOrUpdateStats from "~/node_common/data/methods/create-or-update-stats";
|
||||
import createOrphan from "~/node_common/data/methods/create-orphan";
|
||||
|
||||
export {
|
||||
// NOTE(jim): One-offs
|
||||
createOrUpdateStats,
|
||||
createOrphan,
|
||||
getAllDeals,
|
||||
// NOTE(jim): User operations.
|
||||
// NOTE(jim): User operations
|
||||
createUser,
|
||||
updateUserById,
|
||||
deleteUserByUsername,
|
||||
@ -84,7 +89,7 @@ export {
|
||||
getPendingDataForUserId,
|
||||
deletePendingDataByUserId,
|
||||
createPendingData,
|
||||
// NOTE(jim): Slate operations.
|
||||
// NOTE(jim): Slate operations
|
||||
createSlate,
|
||||
getSlateByName,
|
||||
getSlateById,
|
||||
@ -94,14 +99,14 @@ export {
|
||||
deleteSlatesForUserId,
|
||||
deleteSlateById,
|
||||
deleteRepostsByCid,
|
||||
// NOTE(jim): API key operations,
|
||||
// NOTE(jim): API key operations
|
||||
createAPIKeyForUserId,
|
||||
deleteAPIKeyById,
|
||||
deleteAPIKeysForUserId,
|
||||
getAPIKey,
|
||||
getAPIKeyByKey,
|
||||
getAPIKeysByUserId,
|
||||
// NOTE(jim): Subscription operations,
|
||||
// NOTE(jim): Subscription operations
|
||||
createSubscription,
|
||||
getSubscriptionById,
|
||||
getSubscriptionsByUserId,
|
||||
|
@ -62,6 +62,14 @@ export default async (req, res) => {
|
||||
|
||||
SearchManager.updateUser(user, "REMOVE");
|
||||
|
||||
// NOTE(jim): Creates an orphan to preserve the libp2p token
|
||||
// Incase we need to retrieve Filecoin from it.
|
||||
/*
|
||||
await Data.createOrphan({
|
||||
data: { token: user.data.tokens.api },
|
||||
});
|
||||
*/
|
||||
|
||||
const deleted = await Data.deleteUserByUsername({
|
||||
username: user.username,
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user