Merge branch 'hotfix/1.3.1'
This commit is contained in:
@@ -4,7 +4,7 @@ import { notFound } from 'next/navigation';
|
|||||||
export async function GET(request: Request, { params:{ id } }: { params: { id:string } }) {
|
export async function GET(request: Request, { params:{ id } }: { params: { id:string } }) {
|
||||||
const [locationID, billID] = id.split('-');
|
const [locationID, billID] = id.split('-');
|
||||||
|
|
||||||
const [location, bill] = await fetchBillById(locationID, billID) ? [];
|
const [location, bill] = await fetchBillById(locationID, billID) ?? [];
|
||||||
|
|
||||||
if(!bill?.attachment) {
|
if(!bill?.attachment) {
|
||||||
notFound();
|
notFound();
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { ObjectId } from 'mongodb';
|
|||||||
import { withUser } from '@/app/lib/auth';
|
import { withUser } from '@/app/lib/auth';
|
||||||
import { AuthenticatedUser } from '../types/next-auth';
|
import { AuthenticatedUser } from '../types/next-auth';
|
||||||
import { gotoHome } from './navigationActions';
|
import { gotoHome } from './navigationActions';
|
||||||
|
import { Noto_Sans_Tamil_Supplement } from 'next/font/google';
|
||||||
|
|
||||||
export type State = {
|
export type State = {
|
||||||
errors?: {
|
errors?: {
|
||||||
@@ -14,7 +15,7 @@ export type State = {
|
|||||||
locationNotes?: string[],
|
locationNotes?: string[],
|
||||||
};
|
};
|
||||||
message?:string | null;
|
message?:string | null;
|
||||||
}
|
};
|
||||||
|
|
||||||
const FormSchema = z.object({
|
const FormSchema = z.object({
|
||||||
_id: z.string(),
|
_id: z.string(),
|
||||||
@@ -81,6 +82,11 @@ export const updateOrAddLocation = withUser(async (user:AuthenticatedUser, locat
|
|||||||
}
|
}
|
||||||
|
|
||||||
await gotoHome(yearMonth ? `/?year=${yearMonth?.year}` : undefined)
|
await gotoHome(yearMonth ? `/?year=${yearMonth?.year}` : undefined)
|
||||||
|
|
||||||
|
return {
|
||||||
|
message: null,
|
||||||
|
errors: undefined,
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user