move version to its own endpoint
This commit is contained in:
@@ -2,7 +2,7 @@ import './installer';
|
||||
|
||||
import { api, body, defaultResponse, endpoint, request, response } from '@airtasker/spot';
|
||||
|
||||
import { ErrorResponse, InitResponse, UserLoginRequest, UserResponse } from './models';
|
||||
import { ErrorResponse, InitResponse, UserLoginRequest, UserResponse, VersionResponse } from './models';
|
||||
|
||||
/* eslint-disable */
|
||||
@api({ name: "umbraco-backoffice-api", version: "1.0.0" })
|
||||
@@ -20,6 +20,18 @@ class GetInit {
|
||||
default(@body body: ErrorResponse) { }
|
||||
}
|
||||
|
||||
@endpoint({
|
||||
method: "GET",
|
||||
path: "/version",
|
||||
})
|
||||
class GetVersion {
|
||||
@response({ status: 200 })
|
||||
success(@body body: VersionResponse) { }
|
||||
|
||||
@defaultResponse
|
||||
default(@body body: ErrorResponse) { }
|
||||
}
|
||||
|
||||
@endpoint({
|
||||
method: "POST",
|
||||
path: "/user/login",
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
export interface InitResponse {
|
||||
version: string;
|
||||
installed: boolean;
|
||||
}
|
||||
|
||||
export interface VersionResponse {
|
||||
version: string;
|
||||
}
|
||||
|
||||
export interface UserResponse {
|
||||
username: string;
|
||||
role: string;
|
||||
|
||||
Reference in New Issue
Block a user