forked from bluesky-social/atproto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor repo routes * basic blob route * getBlob route * tidy * move getBlob to sync * allow mimetype on getBlob * creator on blob table * migration * migration * handle deletes & check db on getBlob * fix content type bug * back to octet-stream * Update packages/pds/src/api/com/atproto/sync/getBlob.ts Co-authored-by: devin ivy <[email protected]> * fix up migrations * pr feedback * fixing up merge & migration * patched up migration --------- Co-authored-by: devin ivy <[email protected]>
- Loading branch information
Showing
30 changed files
with
785 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "com.atproto.sync.getBlob", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Get a blob associated with a given repo.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["did", "cid"], | ||
"properties": { | ||
"did": {"type": "string", "description": "The DID of the repo."}, | ||
"cid": {"type": "string", "description": "The CID of the blob to fetch"} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "*/*" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/** | ||
* GENERATED CODE - DO NOT MODIFY | ||
*/ | ||
import { Headers, XRPCError } from '@atproto/xrpc' | ||
import { ValidationResult } from '@atproto/lexicon' | ||
import { isObj, hasProp } from '../../../../util' | ||
import { lexicons } from '../../../../lexicons' | ||
|
||
export interface QueryParams { | ||
/** The DID of the repo. */ | ||
did: string | ||
/** The CID of the blob to fetch */ | ||
cid: string | ||
} | ||
|
||
export type InputSchema = undefined | ||
|
||
export interface CallOptions { | ||
headers?: Headers | ||
} | ||
|
||
export interface Response { | ||
success: boolean | ||
headers: Headers | ||
data: Uint8Array | ||
} | ||
|
||
export function toKnownErr(e: any) { | ||
if (e instanceof XRPCError) { | ||
} | ||
return e | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.