Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Duniter Datapod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
nodes
Duniter Datapod
Commits
6863711c
Commit
6863711c
authored
1 year ago
by
Hugo Trentesaux
Browse files
Options
Downloads
Patches
Plain Diff
handle deletion
parent
ac79f4be
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/consts.ts
+1
-0
1 addition, 0 deletions
src/consts.ts
src/indexer/database.ts
+7
-1
7 additions, 1 deletion
src/indexer/database.ts
with
8 additions
and
1 deletion
src/consts.ts
+
1
−
0
View file @
6863711c
...
@@ -19,3 +19,4 @@ export const EMPTY_NODE_CID = CID.parse('bafyreicvlp2p65agkxpzcboedba7zit55us4zv
...
@@ -19,3 +19,4 @@ export const EMPTY_NODE_CID = CID.parse('bafyreicvlp2p65agkxpzcboedba7zit55us4zv
// document kind of old cesium plus profile imported in the indexer
// document kind of old cesium plus profile imported in the indexer
export
const
CESIUM_PLUS_PROFILE_IMPORT
=
CID
.
parse
(
'
bafkreiawtammeqc55cssr2zepfpaxbmp7kquhikkagipvtefeadsw4mqvq
'
)
export
const
CESIUM_PLUS_PROFILE_IMPORT
=
CID
.
parse
(
'
bafkreiawtammeqc55cssr2zepfpaxbmp7kquhikkagipvtefeadsw4mqvq
'
)
export
const
CESIUM_PLUS_PROFILE_INSERT
=
CID
.
parse
(
'
bafkreigi5phtqpo6a2f3tx4obaja4fzevy3nyvnl4bnkcxylyqnfeowzbm
'
)
export
const
CESIUM_PLUS_PROFILE_INSERT
=
CID
.
parse
(
'
bafkreigi5phtqpo6a2f3tx4obaja4fzevy3nyvnl4bnkcxylyqnfeowzbm
'
)
export
const
CESIUM_PLUS_PROFILE_DELETE
=
CID
.
parse
(
'
bafkreic5bv5ytl7zv5rh5j2bd5mw6nfrn33mxhiobgmpsiu65yjw3eeduu
'
)
This diff is collapsed.
Click to expand it.
src/indexer/database.ts
+
7
−
1
View file @
6863711c
import
{
CESIUM_PLUS_PROFILE_IMPORT
,
CESIUM_PLUS_PROFILE_INSERT
}
from
'
../consts
'
import
{
CESIUM_PLUS_PROFILE_IMPORT
,
CESIUM_PLUS_PROFILE_INSERT
,
CESIUM_PLUS_PROFILE_DELETE
}
from
'
../consts
'
import
type
{
IndexRequest
}
from
'
../types
'
import
type
{
IndexRequest
}
from
'
../types
'
import
{
CID
}
from
'
multiformats
'
import
{
CID
}
from
'
multiformats
'
import
pg
from
'
pg
'
import
pg
from
'
pg
'
...
@@ -127,6 +127,12 @@ export async function handleInsertRequest(irCID: CID, ir: IndexRequest) {
...
@@ -127,6 +127,12 @@ export async function handleInsertRequest(irCID: CID, ir: IndexRequest) {
break
break
}
}
// delete
case
CESIUM_PLUS_PROFILE_DELETE
.
toString
():
{
await
client
.
query
(
`DELETE FROM profiles WHERE pubkey = $1;`
,
[
ir
.
pubk
])
break
}
// unimplemented
// unimplemented
default
:
default
:
console
.
log
(
'
🔴 unimplemented kind
'
+
ir
.
kind
)
console
.
log
(
'
🔴 unimplemented kind
'
+
ir
.
kind
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment