mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-26 03:11:12 +01:00
Template Tag Function Editor (#67)

This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { getKeyValue, setKeyValue } from '../lib/keyValueStore';
|
||||
import { useKeyValue } from './useKeyValue';
|
||||
|
||||
export function protoFilesArgs(requestId: string | null) {
|
||||
@@ -10,3 +11,11 @@ export function protoFilesArgs(requestId: string | null) {
|
||||
export function useGrpcProtoFiles(activeRequestId: string | null) {
|
||||
return useKeyValue<string[]>({ ...protoFilesArgs(activeRequestId), fallback: [] });
|
||||
}
|
||||
|
||||
export async function getGrpcProtoFiles(requestId: string) {
|
||||
return getKeyValue<string[]>({ ...protoFilesArgs(requestId), fallback: [] });
|
||||
}
|
||||
|
||||
export async function setGrpcProtoFiles(requestId: string, protoFiles: string[]) {
|
||||
return setKeyValue<string[]>({ ...protoFilesArgs(requestId), value: protoFiles });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user