Closed jackyzha0 closed 1 year ago
@fauno Heads up, this changes the HTTP API a bit for updating site data.
Could you point me to those changes? I saw there's a change on NewSite and publication changed to a protocolos object of protocol: Boolean pairs?
Could you point me to those changes? I saw there's a change on NewSite and publication changed to a protocolos object of protocol: Boolean pairs?
Nevermind, I'm reading the files :)
i'm having this tsc error when running dev
script after the last commit, removing the whole block of sync code con v1/api/sites.ts works for the tests i was doing.
config/sites.ts(34,13): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index ty
pe '{ ipfs: boolean; hyper: boolean; http: boolean; }'.
No index signature with a parameter of type 'string' was found on type '{ ipfs: boolean; hyper: boolean; http: boolean; }'.
config/sites.ts(35,27): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index ty
pe 'ProtocolManager'.
No index signature with a parameter of type 'string' was found on type 'ProtocolManager'.
config/sites.ts(37,20): error TS7006: Parameter 'protocolLinks' implicitly has an 'any' type.
config/sites.ts(38,15): error TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index ty
pe 'Partial<{ ipfs: { gateway: string; cid: string; pubKey: string; } & { link: string; enabled: boolean; }; hyper: { gateway: string; r
aw: string; } & { link: string; enabled: boolean; }; http: {} & { link: string; enabled: boolean; }; }>'.
No index signature with a parameter of type 'string' was found on type 'Partial<{ ipfs: { gateway: string; cid: string; pubKey: string
; } & { link: string; enabled: boolean; }; hyper: { gateway: string; raw: string; } & { link: string; enabled: boolean; }; http: {} & {
link: string; enabled: boolean; }; }>'.
not sure if this change affects the api endpoints, i'd have to adapt the client. it seems to work for a nanoid still, but not sure if internally it thinks it's the domain name
- const id = nanoid()
+ const id = cfg.domain
Oh, I messed up some typescript types, working on fixing it now
Just gonna add some more fixes for the protocol stuff first
Make sure to do an npm install
call after pulling.
Remaining steps:
site.tar.gz
fixture and the form-data module https://github.com/fastify/light-my-request/issues/35ipfs.files.touch
Closes https://github.com/hyphacoop/distributed-press-organizing/issues/62