fixed upload to slate issue

This commit is contained in:
Martina 2020-12-23 15:43:25 -08:00
parent 6f4b0fa6a4
commit 1f8bfc8e34
3 changed files with 7 additions and 4 deletions

View File

@ -232,8 +232,11 @@ export default class ApplicationPage extends React.Component {
const current = NavigationData.getCurrentById(navigation, next.id);
let slate = null;
if (current.target && current.target.slateId) {
slate = { id: current.target.slateId };
if (
current.target.id === "NAV_SLATE" &&
this.state.data?.data?.ownerId === this.props.viewer?.id
) {
slate = this.state.data;
}
this._handleRegisterFileLoading({ fileLoading });
this._handleUpload({ files, slate, keys: Object.keys(fileLoading), numFailed });

View File

@ -14,7 +14,8 @@
"build-system": "rollup -c",
"scripts": "NODE_TLS_REJECT_UNAUTHORIZED=0 node --max-old-space-size=8192 ./scripts",
"www-setup-database": "NODE_TLS_REJECT_UNAUTHORIZED=0 node ./scripts setup-database",
"www-seed-database": "NODE_TLS_REJECT_UNAUTHORIZED=0 node ./scripts seed-database"
"www-seed-database": "NODE_TLS_REJECT_UNAUTHORIZED=0 node ./scripts seed-database",
"www-adjust-database": "NODE_TLS_REJECT_UNAUTHORIZED=0 node ./scripts adjust"
},
"repository": "filecoin-project/slate",
"dependencies": {

View File

@ -302,7 +302,6 @@ app.prepare().then(async () => {
const id = Utilities.getIdFromCookie(req);
const shouldViewerRedirect = await ViewerManager.shouldRedirect({ id });
if (shouldViewerRedirect) {
console.log("redirect");
return res.redirect(
`/_${Strings.createQueryParams({
scene: "NAV_SLATE",