Skip to content

Commit

Permalink
feat: remove issuer row (#1345)
Browse files Browse the repository at this point in the history
This is based on #1344 and it stops passing issuer when inserting into a
table. I wanted to make this a separate PR so we can update w3infra
first and remove field there and then stop passing here.
  • Loading branch information
Gozala authored May 13, 2024
1 parent 49aef56 commit cf5b0db
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 1 addition & 2 deletions packages/upload-api/src/store/add.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function storeAddProvider(context) {
const space = /** @type {import('@ucanto/interface').DIDKey} */ (
Server.DID.parse(capability.with).did()
)
const issuer = invocation.issuer.did()

const [allocated, carExists] = await Promise.all([
allocate(
{
Expand All @@ -47,7 +47,6 @@ export function storeAddProvider(context) {
link,
size,
origin,
issuer,
invocation: invocation.cid,
})
if (res.error) {
Expand Down
7 changes: 6 additions & 1 deletion packages/upload-api/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,12 @@ export interface StoreAddInput {
link: CARLink
size: number
origin?: UnknownLink
issuer: DID

/**
* @deprecated - Issuer of the invocation is irrelevant as long as
* they have authorization to invoke on subject `space`.
*/
issuer?: DID
invocation: UCANLink
}

Expand Down

0 comments on commit cf5b0db

Please sign in to comment.