@@ -30,7 +30,6 @@ export async function getRelatedNFTs(id: string){
30
30
nfts = nfts . slice ( 0 , nfts . length / 3 )
31
31
return nfts ;
32
32
} catch ( err ) {
33
- console . error ( err )
34
33
throw Error ( "No NFTs found of given collection!" )
35
34
}
36
35
@@ -47,7 +46,6 @@ export async function getCollections(): Promise<Collection[]>{
47
46
return collections ;
48
47
} catch ( err ) {
49
48
let default_collections = [ { symbol : 'mad_lads' } , { symbol : 'giga_buds' } , { symbol : 'solana_monkey_business' } , { symbol : 'mimany' } , { symbol : 'rune_pkers' } , { symbol : 'wifhoodies' } , { symbol : 'claynosaurz' } ] ;
50
- console . error ( err ) ;
51
49
return default_collections ;
52
50
}
53
51
}
@@ -77,7 +75,6 @@ export async function getNFTSFromCollections(collections: Collection[]): Promise
77
75
listed : true
78
76
} ;
79
77
} catch ( error ) {
80
- console . error ( error ) ;
81
78
return {
82
79
id : id ,
83
80
slug : symbol ,
@@ -116,7 +113,6 @@ export async function getListingsOfCollection(symbol: string): Promise<Listing[]
116
113
return listings ;
117
114
118
115
} catch ( err ) {
119
- console . error ( err ) ;
120
116
throw Error ( "unable to fetch listings of the given collection!" )
121
117
}
122
118
}
@@ -132,9 +128,8 @@ export async function submitData(): Promise<void>{
132
128
headers : { 'Content-Type' : 'application/json' } ,
133
129
body : JSON . stringify ( body ) ,
134
130
} ) ;
135
- console . log ( "POST SUCCESS" )
136
131
} catch ( error ) {
137
- console . error ( error ) ;
132
+ throw Error ( "Unable to submit data" )
138
133
}
139
134
}
140
135
}
@@ -146,10 +141,8 @@ export async function submitData(): Promise<void>{
146
141
headers : { 'Content-Type' : 'application/json' }
147
142
} ) ;
148
143
const list = ( await res . json ( ) )
149
- console . log ( "list is here" )
150
144
return list ;
151
145
} catch ( error ) {
152
- console . error ( error ) ;
153
146
throw Error ( "Unable to fetch list from /api/fetchlist" )
154
147
}
155
148
}
@@ -163,6 +156,6 @@ export async function submitData(): Promise<void>{
163
156
const count = ( await res . json ( ) )
164
157
return count ;
165
158
} catch ( error ) {
166
- console . error ( error ) ;
159
+ throw Error ( "Unable to get Count" )
167
160
}
168
161
}
0 commit comments