This is an automated email from the ASF dual-hosted git repository.
apratim pushed a commit to branch main
in repository
https://gitbox.apache.org/repos/asf/incubator-resilientdb-resvault.git
The following commit(s) were added to refs/heads/main by this push:
new d0569d5 Removed uncessary code
d0569d5 is described below
commit d0569d5a277526db4ac06b7a9034c906f12e5e6e
Author: Apratim Shukla <[email protected]>
AuthorDate: Tue Sep 24 19:14:31 2024 -0700
Removed uncessary code
---
src/client.js | 31 -------------------------------
src/constants.js | 35 -----------------------------------
2 files changed, 66 deletions(-)
diff --git a/src/client.js b/src/client.js
deleted file mode 100644
index cfc7d9c..0000000
--- a/src/client.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
-* Licensed to the Apache Software Foundation (ASF) under one
-* or more contributor license agreements. See the NOTICE file
-* distributed with this work for additional information
-* regarding copyright ownership. The ASF licenses this file
-* to you under the Apache License, Version 2.0 (the
-* "License"); you may not use this file except in compliance
-* with the License. You may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing,
-* software distributed under the License is distributed on an
-* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-* KIND, either express or implied. See the License for the
-* specific language governing permissions and limitations
-* under the License.
-*/
-
-import axios from 'axios';
-
-export const sendRequest = async (query) => {
- const headers = {
- 'Content-Type': 'application/json'
- };
- const data = {
- query: query
- }
- const response = await axios.post(process.env.REACT_APP_GRAPHQL_SERVER,
data, { headers })
- return response.data;
-};
diff --git a/src/constants.js b/src/constants.js
deleted file mode 100644
index bcd98d8..0000000
--- a/src/constants.js
+++ /dev/null
@@ -1,35 +0,0 @@
-export const OPS = {
- CREATE: "CREATE",
- FETCH: "FETCH",
- UPDATE: "UPDATE",
- UPDATE_ALL: "UPDATE MULTIPLE",
- FILTER: "FILTER",
- INFO: "ACCOUNT"
-};
-
-export const OP_DATA = {
- [OPS.CREATE]: {
- from: "commit",
- requiredFields: ['address', 'amount', 'data']
- },
- [OPS.FETCH]: {
- from: "get",
- requiredFields: ['id']
- },
- [OPS.UPDATE]: {
- from: "update",
- requiredFields: ['address', 'amount', 'data', 'id']
- },
- [OPS.UPDATE_ALL]: {
- from: "update-multi",
- requiredFields: ['values']
- },
- [OPS.FILTER]: {
- from: "filter",
- requiredFields: ['recipientPublicKey']
- },
- [OPS.INFO]: {
- from: "account",
- requiredFields: []
- }
-}