on master help sign in
pages/id: don't send invalid patps to network explorer
commit0035d6708689751ba9b911e23d8d43502f92273e authorMatilde Park <matilde.park@urbit.org> dateFri 22 Apr 2022, 14:19 (5 years ago) parent03a351b
1 file changed+4−2
pages/id/[id].js+4−2
pages/id/[id].js+4−2
@@ -135,9 +135,11 @@ export const getServerSideProps = async ({ params }) => {
135135 data = { ship: params.id, description: "An Urbit ID." };
136136 }
137137
138− const network = await axios
138+ let network = await axios
139139 .get(
140− `https://mt2aga2c5l.execute-api.us-east-2.amazonaws.com/get-node?urbit-id=${params.id}`
140+ `https://mt2aga2c5l.execute-api.us-east-2.amazonaws.com/get-node?urbit-id=${
141+ ob.isValidPatp(params.id) ? params.id : "~zod"
142+ }`
141143 )
142144 .then((res) => res.data);
143145