Skip to content
Snippets Groups Projects
Unverified Commit 6ddfcf81 authored by xgui3783's avatar xgui3783 Committed by GitHub
Browse files

Merge pull request #1234 from FZJ-INM1-BDA/bugfix_saneUrlEmptyBody

bugfix: saneurl empty body
parents 09e75003 f8cc52b6
No related branches found
No related tags found
No related merge requests found
......@@ -104,7 +104,8 @@ router.post('/:name',
limiterMiddleware(),
express.json(),
async (req, res) => {
if (req.headers['x-noop']) return res.status(200).end()
if (/bot/i.test(req.headers['user-agent'])) return res.status(201).end()
if (req.headers['x-noop']) return res.status(201).end()
const { name } = req.params
try {
await proxyStore.set(req, name, req.body)
......
......@@ -68,6 +68,7 @@
- [ ] saneurl generation functions properly
- [ ] try existing key (human), and get unavailable error
- [ ] try non existing key, and get available
- [ ] create use key `x-tmp-foo` and new url works
- [ ] [saneUrl](https://atlases.ebrains.eu/viewer-staging/saneUrl/bigbrainGreyWhite) redirects to big brain
- [ ] [saneUrl](https://atlases.ebrains.eu/viewer-staging/saneUrl/julichbrain) redirects to julich brain (colin 27)
- [ ] [saneUrl](https://atlases.ebrains.eu/viewer-staging/saneUrl/whs4) redirects to waxholm v4
......
......@@ -8,6 +8,7 @@ import { ReactiveFormsModule, FormsModule } from "@angular/forms";
import { AuthModule } from "src/auth";
import { ShareSheetComponent } from "./shareSheet/shareSheet.component";
import { ShareDirective } from "./share.directive";
import { StateModule } from "src/state";
@NgModule({
imports: [
......@@ -17,6 +18,7 @@ import { ShareDirective } from "./share.directive";
FormsModule,
ReactiveFormsModule,
AuthModule,
StateModule,
],
declarations: [
ClipboardCopy,
......
import { Component } from "@angular/core";
import { Component, TemplateRef } from "@angular/core";
import { MatDialog } from "@angular/material/dialog";
import { ARIA_LABELS } from 'common/constants'
import { SaneUrl } from "../saneUrl/saneUrl.component"
@Component({
selector: 'sxplr-share-sheet',
......@@ -18,7 +17,7 @@ export class ShareSheetComponent{
}
openShareSaneUrl(){
this.dialog.open(SaneUrl, { ariaLabel: ARIA_LABELS.SHARE_CUSTOM_URL })
openDialog(templateRef: TemplateRef<unknown>){
this.dialog.open(templateRef, { ariaLabel: ARIA_LABELS.SHARE_CUSTOM_URL })
}
}
......@@ -17,8 +17,10 @@
<mat-list-item
[attr.aria-label]="ARIA_LABELS.SHARE_CUSTOM_URL"
[attr.tab-index]="10"
(click)="openShareSaneUrl()"
(click)="openDialog(saneUrlTmpl)"
[matTooltip]="ARIA_LABELS.SHARE_CUSTOM_URL"
iav-state-aggregator
#stateAggregator="iavStateAggregator"
>
<mat-icon
class="mr-4"
......@@ -32,3 +34,9 @@
</mat-list-item>
</mat-nav-list>
<ng-template #saneUrlTmpl>
<iav-sane-url [stateTobeSaved]="stateAggregator.jsonifiedState$ | async">
</iav-sane-url>
</ng-template>
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment