mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
[appdef] api endpoint fixes (#7888)
* fixes: moved fetching app version to v2 api * fixes: app slug api
This commit is contained in:
parent
da599e135b
commit
a000a7fdd9
2 changed files with 4 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ export const CreateVersion = ({
|
|||
});
|
||||
|
||||
appVersionService
|
||||
.getOne(appId, data.id)
|
||||
.getAppVersionData(appId, data.id)
|
||||
.then((data) => {
|
||||
setAppDefinitionFromVersion(data);
|
||||
})
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import {
|
|||
UseInterceptors,
|
||||
} from '@nestjs/common';
|
||||
import { JwtAuthGuard } from '../../src/modules/auth/jwt-auth.guard';
|
||||
import { AppAuthGuard } from 'src/modules/auth/app-auth.guard';
|
||||
import { AppsService } from '../services/apps.service';
|
||||
import { camelizeKeys, decamelizeKeys } from 'humps';
|
||||
import { AppsAbilityFactory } from 'src/modules/casl/abilities/apps-ability.factory';
|
||||
|
|
@ -101,6 +102,8 @@ export class AppsControllerV2 {
|
|||
return response;
|
||||
}
|
||||
|
||||
@UseGuards(AppAuthGuard) // This guard will allow access for unauthenticated user if the app is public
|
||||
@Get('slugs/:slug')
|
||||
async appFromSlug(@User() user, @AppDecorator() app: App) {
|
||||
if (user) {
|
||||
const ability = await this.appsAbilityFactory.appsActions(user, app.id);
|
||||
|
|
|
|||
Loading…
Reference in a new issue