mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
list room
This commit is contained in:
+12
-2
@@ -28,6 +28,16 @@ roomDataSource.version(1).stores({
|
||||
room: '++id, createdBy, roomName, roomType, expirationDate'
|
||||
});
|
||||
|
||||
|
||||
interface CreateRoomParams {
|
||||
id?: string;
|
||||
roomName?: string;
|
||||
createdBy?: any;
|
||||
createdAt?: Date;
|
||||
expirationDate?: Date;
|
||||
roomType?: any;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
@@ -38,10 +48,10 @@ export class RoomLocalDataSourceService {
|
||||
constructor() {}
|
||||
|
||||
|
||||
async createRoom(data: RoomOutPutDTO) {
|
||||
async createRoom(data: CreateRoomParams) {
|
||||
|
||||
try {
|
||||
const result = await roomDataSource.room.add(data.data)
|
||||
const result = await roomDataSource.room.add(data)
|
||||
return ok(result)
|
||||
} catch (e) {
|
||||
return err(false)
|
||||
|
||||
Reference in New Issue
Block a user