Send pics to new viewer and add placeholder images

This commit is contained in:
Mentor Palokaj 2021-10-21 18:09:25 +02:00
parent d18b8b003c
commit 6cce80fc57
2 changed files with 5 additions and 4 deletions

View File

@ -14,6 +14,7 @@ const globalAttributes = [
]
const heavenlyBodies = [ "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto", "the Moon", "the Sun" ]
const web2domain = 'https://rocketeer.fans'
const lorem = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.'
// ///////////////////////////////
// Rocketeer helpers
@ -103,9 +104,9 @@ async function generateRocketeer( id, network='mainnet' ) {
// The base object of a new Rocketeer
const rocketeer = {
name: `${ name.first() } ${ name.middle() } ${ name.last() } of ${ pickRandomArrayEntry( heavenlyBodies ) }`,
description: ``,
description: lorem,
image: ``,
external_url: `https://viewer.rocketeer.fans/rocketeer/${ id }` + network == 'mainnet' ? '' : '?testnet=true',
external_url: `https://viewer.rocketeer.fans/?rocketeer=${ id }` + network == 'mainnet' ? '' : '&testnet=true',
attributes: []
}
@ -113,7 +114,7 @@ async function generateRocketeer( id, network='mainnet' ) {
rocketeer.attributes = pickRandomAttributes( globalAttributes )
// TODO: Generate, compile and upload image
rocketeer.image = web2domain
rocketeer.image = `${web2domain}/assets/draft-rocketeer.png`
// Save new Rocketeer
await db.collection( `${ network }Rocketeers` ).doc( id ).set( rocketeer )

View File

@ -35,7 +35,7 @@ app.get( '/testnetapi/collection', async ( req, res ) => res.json( {
totalSupply: await getTotalSupply( 'rinkeby' ).catch( f => 'error' ),
description: "A testnet collection",
external_url: web2domain,
image: "https://rocketpool.net/images/rocket.png",
image: "https://rocketeer.fans/assets/draft-rocketeer.png",
name: `Rocketeer collection`,
seller_fee_basis_points: 0,
fee_recipient: "0x0"