File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
apps/array/src/main/trpc/routers Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,9 @@ import { publicProcedure, router } from "../trpc.js";
77const log = logger . scope ( "secureStoreRouter" ) ;
88
99export const secureStoreRouter = router ( {
10+ /**
11+ * Get an encrypted item from the store
12+ */
1013 getItem : publicProcedure
1114 . input ( z . object ( { key : z . string ( ) } ) )
1215 . query ( async ( { input } ) => {
@@ -19,6 +22,10 @@ export const secureStoreRouter = router({
1922 return null ;
2023 }
2124 } ) ,
25+
26+ /**
27+ * Set an encrypted item in the store
28+ */
2229 setItem : publicProcedure
2330 . input ( z . object ( { key : z . string ( ) , value : z . string ( ) } ) )
2431 . query ( async ( { input } ) => {
@@ -28,6 +35,10 @@ export const secureStoreRouter = router({
2835 log . error ( "Failed to set item:" , error ) ;
2936 }
3037 } ) ,
38+
39+ /**
40+ * Remove an item from the store
41+ */
3142 removeItem : publicProcedure
3243 . input ( z . object ( { key : z . string ( ) } ) )
3344 . query ( async ( { input } ) => {
@@ -37,6 +48,10 @@ export const secureStoreRouter = router({
3748 log . error ( "Failed to remove item:" , error ) ;
3849 }
3950 } ) ,
51+
52+ /**
53+ * Clear all items from the store
54+ */
4055 clear : publicProcedure . query ( async ( ) => {
4156 try {
4257 rendererStore . clear ( ) ;
You can’t perform that action at this time.
0 commit comments