mirror of
https://github.com/oceanprotocol/ocean-subgraph.git
synced 2024-06-17 18:03:27 +02:00
12 lines
214 B
TypeScript
12 lines
214 B
TypeScript
import { User } from '../../@types/schema'
|
|
|
|
export function getUser(address: string): User {
|
|
let user = User.load(address)
|
|
if (user === null) {
|
|
user = new User(address)
|
|
user.save()
|
|
}
|
|
|
|
return user
|
|
}
|