From 6cce80fc5753e6f96c4c8a18b3946d9810dfc632 Mon Sep 17 00:00:00 2001 From: Mentor Palokaj Date: Thu, 21 Oct 2021 18:09:25 +0200 Subject: [PATCH] Send pics to new viewer and add placeholder images --- functions/modules/rocketeer.js | 7 ++++--- functions/modules/testnet.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/functions/modules/rocketeer.js b/functions/modules/rocketeer.js index d5c0cc8..ddf8f6d 100644 --- a/functions/modules/rocketeer.js +++ b/functions/modules/rocketeer.js @@ -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 ) diff --git a/functions/modules/testnet.js b/functions/modules/testnet.js index 8e700ef..2236ff0 100644 --- a/functions/modules/testnet.js +++ b/functions/modules/testnet.js @@ -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"