Skip to content

Commit 5094ba3

Browse files
committed
🧹 cleanup unused types
1 parent 9515684 commit 5094ba3

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

nft-storage/src/lib.rs

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use serde::{Deserialize, Serialize};
22
use worker::*;
33
use reqwest::{ Client, Body, StatusCode };
4-
use chrono::{Duration, Utc, SecondsFormat};
5-
use nftstorage::NftStorage;
4+
use nftstorage::{NftStorage, StorageApiResponse};
65
use std::result::Result as StdResult;
76

87
mod utils;
@@ -13,41 +12,12 @@ mod fetch;
1312
type CorsHeaders = cors::CorsHeaders;
1413

1514

16-
#[derive(Serialize, Deserialize, Debug)]
17-
struct StorageApiResponse {
18-
ok: bool,
19-
value: ValueApiResponse
20-
}
21-
22-
#[derive(Serialize, Deserialize, Debug)]
23-
struct PinningKey {
24-
ok: bool,
25-
value: String
26-
}
27-
28-
#[derive(Serialize, Deserialize, Debug)]
29-
struct PinningKeyResponse {
30-
expiry: String,
31-
token: String
32-
}
33-
34-
#[derive(Serialize, Deserialize, Debug)]
35-
struct ValueApiResponse {
36-
cid: String,
37-
size: u32,
38-
r#type: String,
39-
created: String,
40-
}
41-
42-
4315
#[derive(Serialize, Deserialize, Debug)]
4416
struct UrlPinRequest {
4517
url: String,
4618
}
4719

4820

49-
50-
5121
fn log_request(req: &Request) {
5222
console_log!(
5323
"{} - [{}], located at: {:?}, within: {}",

0 commit comments

Comments
 (0)