Skip to content

Commit

Permalink
[Version] Update to v1.1.3-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
ppabcd committed Feb 4, 2022
1 parent 718a938 commit a2b9408
Show file tree
Hide file tree
Showing 31 changed files with 49 additions and 52 deletions.
10 changes: 5 additions & 5 deletions components/modal/Airdrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const isHideType = ref(true)
const networkData = useNetworkData()
const airdropData = useAirdropData()
async function checkNetwork(){
const {data} = await useFetch('/api/getNetwork', {
const {data} = await useFetch('/api/network', {
method: 'POST'
})
if(data.value){
Expand All @@ -36,7 +36,7 @@ async function checkNetwork(){
}
}
async function checkAirdrop(){
const {data} = await useFetch('/api/getAirdrop', {
const {data} = await useFetch('/api/airdrop', {
method: 'POST'
})
if(data.value){
Expand Down Expand Up @@ -75,7 +75,7 @@ async function addAirdrop(){
return
}
if(id.value !== '' && tempType.value !== ''){
await useFetch('/api/deleteAirdrop', {
await useFetch('/api/airdrop/destroy', {
method: 'POST',
body: {
id: id.value,
Expand All @@ -85,7 +85,7 @@ async function addAirdrop(){
id.value = ''
tempType.value = ''
}
const {data} = await useFetch('/api/postAirdrop', {
const {data} = await useFetch('/api/airdrop/store', {
method: 'POST',
body: airdropData
})
Expand All @@ -99,7 +99,7 @@ async function addAirdrop(){
}
}
async function deleteAirdrop(){
const {data} = await useFetch('/api/deleteAirdrop', {
const {data} = await useFetch('/api/airdrop/destroy', {
method: 'POST',
body: {
id: id.value,
Expand Down
4 changes: 2 additions & 2 deletions components/modal/Auth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ async function login(){
url.value = ''
return
}
const {data} = await useFetch('/api/setUrl', {
const {data} = await useFetch('/api/url/store', {
method: 'POST',
body: {
url: url.value,
Expand All @@ -31,7 +31,7 @@ async function login(){
}
}
async function checkCredentials(){
const {data} = await useFetch('/api/checkUrl')
const {data} = await useFetch('/api/url')
if(data.value){
if(data.value.message == "ok"){
showAuthModal.value = 0
Expand Down
8 changes: 4 additions & 4 deletions components/modal/Wallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function networkChanged(){
isHide.value = (network.value != '-')
}
async function generateAddress(){
const {data} = await useFetch('/api/generateAddress')
const {data} = await useFetch('/api/address/generate')
if(data.value){
if(data.value.message == "ok"){
address.value = data.value.address
Expand All @@ -43,7 +43,7 @@ async function generateAddress(){
}
async function checkWallet(){
const {data} = await useFetch('/api/getWallet', {
const {data} = await useFetch('/api/wallet', {
method: 'POST'
})
if(data.value){
Expand All @@ -53,7 +53,7 @@ async function checkWallet(){
}
}
async function checkNetwork(){
const {data} = await useFetch('/api/getNetwork', {
const {data} = await useFetch('/api/network', {
method: 'POST'
})
if(data.value){
Expand All @@ -77,7 +77,7 @@ async function addWallet(){
}
}
const {data} = await useFetch('/api/postWallet', {
const {data} = await useFetch('/api/wallet/store', {
method: 'POST',
body: {
id: id.value == '' || id.value == undefined ? parseInt(time) + uniqueTime : id.value,
Expand Down
4 changes: 2 additions & 2 deletions components/page/Airdrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ async function showAirdropModal(){
airdropModal.value = 1
}
async function checkAirdrop(){
const {data} = await useFetch('/api/getAirdrop', {
const {data} = await useFetch('/api/airdrop', {
method: 'POST'
})
if(data.value){
Expand All @@ -188,7 +188,7 @@ function getFormatedDate(date){
return date.getDate() + " " + months[date.getMonth()] + " " + date.getFullYear()
}
async function showAirdrop(id, type){
const {data} = await useFetch('/api/showAirdrop', {
const {data} = await useFetch('/api/airdrop/show', {
method: 'POST',
body: {
id: id,
Expand Down
16 changes: 8 additions & 8 deletions components/page/Sosmed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function addAccount(){
accessToken: accessToken.value,
accessTokenSecret: accessTokenSecret.value
}
const {data} = await useFetch('/api/addTwitterAccount', {
const {data} = await useFetch('/api/twitter/account/store', {
method: 'POST',
body: apiData
})
Expand Down Expand Up @@ -91,7 +91,7 @@ async function tweetAction(){
return
}
twitterRestData.tweet = tweetText.value
const {data} = await useFetch('/api/tweet', {
const {data} = await useFetch('/api/twitter/store', {
method: 'POST',
body: twitterRestData
})
Expand All @@ -105,7 +105,7 @@ async function tweetAction(){
}
async function getAccount(){
const {data} = await useFetch('/api/getTwitterAccount', {
const {data} = await useFetch('/api/twitter/account', {
method: 'GET'
})
if(data.value){
Expand All @@ -117,7 +117,7 @@ async function getAccount(){
}
}
async function deleteAccount(id){
const {data} = await useFetch('/api/deleteTwitterAccount', {
const {data} = await useFetch('/api/twitter/account/destroy', {
method: 'POST',
body: {
id: id
Expand Down Expand Up @@ -152,7 +152,7 @@ function addTag(){
}
}
async function getTag(){
const {data} = await useFetch('/api/getTwitterTag', {
const {data} = await useFetch('/api/twitter/tags', {
method: 'GET'
})
if(data.value){
Expand Down Expand Up @@ -190,7 +190,7 @@ async function addTweetTemplate(){
let uniqueTime = nuxtApp.$randomNumber(0,59);
let time = new Date().getTime()/1000
const {data} = await useFetch('/api/postTemplate', {
const {data} = await useFetch('/api/template/store', {
method: 'POST',
body: {
id: parseInt(time) + uniqueTime,
Expand All @@ -212,7 +212,7 @@ async function deleteTemplate(id){
alert('Please select template')
return
}
const {data} = await useFetch('/api/deleteTemplate', {
const {data} = await useFetch('/api/template/destroy', {
method: 'POST',
body: {
id: id
Expand All @@ -228,7 +228,7 @@ async function deleteTemplate(id){
}
}
async function getAllTweetTemplate(){
const {data} = await useFetch('/api/getTemplate', {
const {data} = await useFetch('/api/template', {
method: 'GET'
})
if(data.value){
Expand Down
4 changes: 2 additions & 2 deletions components/section/Network.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<script setup>
const networkData = useNetworkData()
async function checkNetwork(){
const {data} = await useFetch('/api/getNetwork', {
const {data} = await useFetch('/api/network', {
method: 'POST'
})
if(data.value){
Expand All @@ -68,7 +68,7 @@ async function checkNetwork(){
}
}
async function deleteNetwork(id){
const {data} = await useFetch('/api/deleteNetwork', {
const {data} = await useFetch('/api/network/destroy', {
method: 'POST',
body: {
id: id
Expand Down
6 changes: 3 additions & 3 deletions components/section/Wallet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const dataModalWallet = useDataModalWallet()
const walletModal = useWalletModal()
async function checkWallet(){
const {data} = await useFetch('/api/getWallet', {
const {data} = await useFetch('/api/wallet', {
method: 'POST'
})
if(data.value){
Expand All @@ -81,7 +81,7 @@ async function checkWallet(){
}
}
async function editWallet(id){
const {data} = await useFetch('/api/showWallet', {
const {data} = await useFetch('/api/wallet/show', {
method: 'POST',
body: {
id: id
Expand All @@ -98,7 +98,7 @@ async function editWallet(id){
}
}
async function deleteWallet(id){
const {data} = await useFetch('/api/deleteWallet', {
const {data} = await useFetch('/api/wallet/destroy', {
method: 'POST',
body: {
id: id
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "airdrop",
"version": "1.1.1",
"version": "1.1.3",
"description": "Airdrop project is an project for manage your airdrop",
"main": "index.js",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion pages/[menu].vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const authModal = useAuthModal()
const walletData = useWalletData()
async function checkWallet(){
const {data} = await useFetch('/api/getWallet', {
const {data} = await useFetch('/api/wallet', {
method: 'POST'
})
if(data.value){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { setCookie, useBody, defineHandle } from 'h3'
import {encrypt, isValidHttpUrl} from '../helpers'
import { defineHandle } from 'h3'
import { generateMnemonic, EthHdWallet } from 'eth-hd-wallet'


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle, useBody} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
2 changes: 1 addition & 1 deletion server/api/getAirdrop.ts → server/api/airdrop/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
2 changes: 1 addition & 1 deletion server/api/showAirdrop.ts → server/api/airdrop/show.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle, useBody} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
2 changes: 1 addition & 1 deletion server/api/postAirdrop.ts → server/api/airdrop/store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineHandle, useCookie, useBody } from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'
import axios from 'axios'

export default defineHandle(async(req, res)=>{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle, useBody} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
2 changes: 1 addition & 1 deletion server/api/getNetwork.ts → server/api/network/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle, useBody} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
2 changes: 1 addition & 1 deletion server/api/getTemplate.ts → server/api/template/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineHandle, useCookie, useBody } from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'
import axios from 'axios'

export default defineHandle(async(req, res)=>{
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineHandle, useCookie, useBody, setCookie } from 'h3'
import { defineHandle, useCookie } from 'h3'

export default defineHandle(async(req, res)=>{
let accountData = []
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineHandle, useCookie, useBody, setCookie } from 'h3'
import {encrypt} from '../helpers'
import {encrypt} from '../../../helpers'
import {TwitterApi} from 'twitter-api-v2'

export default defineHandle(async(req, res)=>{
Expand Down
4 changes: 2 additions & 2 deletions server/api/tweet.ts → server/api/twitter/store.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineHandle, useBody, useCookie } from 'h3'
import {TwitterApi, UserV2Result} from 'twitter-api-v2'
import { decrypt } from '../helpers'
import {TwitterApi} from 'twitter-api-v2'
import { decrypt } from '../../helpers'

interface ApiData {
apiKey: string,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { defineHandle, useCookie, useBody, setCookie } from 'h3'
import {encrypt} from '../helpers'
import {TwitterApi} from 'twitter-api-v2'
import { defineHandle, useBody, setCookie } from 'h3'

export default defineHandle(async(req, res)=>{
let body = await useBody(req)
Expand Down
2 changes: 1 addition & 1 deletion server/api/checkUrl.ts → server/api/url/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineHandle, useCookie } from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
2 changes: 1 addition & 1 deletion server/api/setUrl.ts → server/api/url/store.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { setCookie, useBody, defineHandle } from 'h3'
import {encrypt, isValidHttpUrl} from '../helpers'
import {encrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
const body = await useBody(req)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle, useBody} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
2 changes: 1 addition & 1 deletion server/api/getWallet.ts → server/api/wallet/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
2 changes: 1 addition & 1 deletion server/api/showWallet.ts → server/api/wallet/show.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios'
import { useCookie, defineHandle, useBody} from 'h3'
import {decrypt, isValidHttpUrl} from '../helpers'
import {decrypt, isValidHttpUrl} from '../../helpers'

export default defineHandle(async(req, res)=>{
let url = await useCookie(req, 'firebase')
Expand Down
Loading

1 comment on commit a2b9408

@vercel
Copy link

@vercel vercel bot commented on a2b9408 Feb 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.